13.5. The keyref Element

The keyref identity constraint assures that each key sequence specified by the keyref exists, by virtue of equality, as a key sequence in the reference identity constraint. The reference identity constraint is always a unique or key identity constraint. Because the keyref identity constraints are slightly more complicated, this section includes two examples. Note that Listing 13.6 is not complicated: It is one key comprised of an element instance value. Listing 13.7 demonstrates the use of two keys. Listing 13.7 also demonstrates mixing key values comprised of element and attribute instance values.

Listing 13.6 portrays both the partNumberKey and a corresponding partNumberRef. The partNumberKey enforces unique part numbers ...

Get XML Schema Complete Reference, The 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.