O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unique values

Going far beyond the DTD concept of using a special attribute type (the ID type) to uniquely identify a single element within the whole document, this standard allows a set of selected elements to form a group, within which each element must have a unique value somewhere within it, though not necessarily an attribute value, and possibly a combination of values.

Unique elements

The Unique element can appear at the end of an Element definition, after the optional ComplexType or SimpleType sub-element. If the test is to be applied to the whole document instance, then this element should be placed in the definition of the root element, as in the Book element definition here (placement elsewhere is discussed later):

 <element name="book"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required