Rather than using xs:ID, we can duplicate what ID does without restricting the value to xs:NAME.
Suppose we have a description of a date and references to that date in some historical text.
We can make the type xs:date and guarantee that there is only on description for each date:
<xs:element name="description-of-date"> <xs:complexType> <xs:sequence> <xs:element ref="xhtml:p" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="date" type="xs:date" use="required"/> <xs:complexType> <xs:unique name="date-is-unique"> <xs:selector xpath="."/> <xs:field xpath="@date"/> </xs:unique> </xs:element>