RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)

You are welcome to use our annotation system to give your feedback.


Name

xsd:IDREF — Definition of references to unique identifiers.

Derived from:

xsd:NCName

Primary:

xsd:string

Known subtypes:

xsd:IDREFS

Data parameters (facets):

enumeration, length, maxLength, minLength, pattern.

Synopsis

<xsd:simpleType name="IDREF" id="IDREF">
  <xsd:restriction base="xsd:NCName"/>
</xsd:simpleType>

Description

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).

The constraint added by this datatype beyond the xsd:NCName datatype from which it is derived is that the values of all the attributes and elements that have a xsd:IDREF datatype must match an ID defined within the same document.

Restrictions

Applications that need to maintain a level of compatibility with DTDs should not use this datatype for elements, but reserve it for attributes.

The lexical domain (NCName) of this datatype doesn't allow definition of numerical key references or references containing whitespaces.

Example

<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>

You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.