XML Schema Complete Reference, The
by Cliff Binstock, Chris Galtenberg, Mike Wooding, Chris Dix, Mitchell Smith, Dave Peterson
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 ...
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