by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)
<xsd:simpleType name="IDREF" id="IDREF"> <xsd:restriction base="xsd:NCName"/> </xsd:simpleType> |
The xsd:IDREF datatype defines references to the identifiers defined by the ID datatype. It emulates the IDREF attribute type of XML DTDs, even though it can be used for simple content elements as well as for attributes.
The lexical space of xsd:IDREF is, like the lexical space of xsd:ID, nonqualified XML names (NCName).
RELAX NG implementations supporting the DTD compatibility feature add a constraint for this datatype beyond the xsd:NCName datatype from which it is derived; the values of all the attributes and elements that have a xsd:IDREF datatype must match an ID defined within the same document.
Applications that need to maintain compatibility with DTDs shouldn't use this datatype for elements, but should instead reserve it for attributes.
The lexical domain (NCName) of this datatype doesn't allow definition of numerical key references or references containing whitespace.
<element name="book"> <element name="isbn"> <data type="xsd:int"/> </element> <element name="title"> <data type="xsd:string"/> </element> <element name="author-ref"> <attribute name="ref"> <data type="xsd:IDREF"/> </attribute> </element> <element name="character-refs"> <data type="xsd:IDREFS"/> </element> <attribute name="identifier"> <data type="xsd:ID"/> </attribute> </element> |
This text is released under the Free Software Foundation GFDL.