Keys and Uniqueness

Schema language offers four different mechanisms for relating Elements to each other. Several offer a means by which schema processors can enforce something similar to the referential integrity or unique key constraints that relational database systems offer. The four mechanisms are (1) ID with IDREF, (2) the xs:unique schema language Element, (3) xs:key and xs:keyref, and (4) XLink and XPointer. Any one of these would require at least a paragraph and an example to explain. That doesn't quite seem appropriate for a discussion about little-used features. To date, most people are content to let their applications enforce referential integrity and uniqueness and to relate different Elements in instance documents using the appropriate ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.