Indicates the unique identifier for an associated element, so that the element’s content may be cross-referenced. IDs must be unique inside their document (not just within their element type), and the XML parser enforces this.
The ID and IDREF attribute values form a primitive reference mechanism for XML. For example, when an id attribute has been used on a <glyph-data> element, that identifier can be referenced by an IDREF-style attribute on a <glyph-ref> element, so that the full glyph data can be pointed to and need not be repeated every time the character is used.
An identifier string is typically 1-32 characters in length and must start with a letter of the alphabet. (It is an XML rule that identifiers may not start with a digit.)
Authoring Note: At present, not all elements with a id attribute are actually of type ID and can be cross-referenced. For backwards compatibility with prior versions of the Journal Archiving Tag Set (versions 1.0, 1.1), the following elements cannot be referenced using the ID/IDREF mechanism:
These elements use a CDATA (data character) attribute type, which does not possess the same cross-reference capability as an ID attribute type found on such elements as <fn>.Value | Meaning |
---|---|
Text, numbers, or special characters | Unique identifier for the element within its document. Parsers cannot check uniqueness or matching. |
Restriction: This attribute may be specified if the element is used. |
Value | Meaning |
---|---|
An XML identifier (ID) | A unique identifier for the element. An XML parser can verify that an IDREF-style attribute pointing to one of these is pointing to a valid ID. |
Restriction: This attribute must be specified if the element is used. |
Value | Meaning |
---|---|
An XML identifier (ID) | A unique identifier for the element. An XML parser can verify that an IDREF-style attribute pointing to one of these is pointing to a valid ID. |
Restriction: This attribute may be specified if the element is used. |