XML Schema Complete Reference, The
by Cliff Binstock, Chris Galtenberg, Mike Wooding, Chris Dix, Mitchell Smith, Dave Peterson
13.3. The unique Element
The unique identity constraint assures that each key sequence—the set of values specified by the XPath expressions of the nested field elements—is unique. A key sequence is unique if no two key sequences have “equal” values for all keys. Unlike the key element, the key sequence does not have to exist for each node in the target node set. The unique identity constraint is appropriate, for example, for optional elements or attributes.
Note
The uniqueness of the key sequence specified by the set of field elements is relative to the element specified by the selector element.
The uniqueness of the keys is dependent on the selector. In the example for this chapter, an identity constraint confines an order to have no more than ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access