id

Identifier

Definition

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); the XML parser enforces this.

Usage

The ID and IDREF attribute values constitute a primitive reference mechanism for XML. For example, when an id attribute has been used on a <fig> element, that identifier can be referenced by an IDREF-style attribute on a <xref> element, so that the figure can be pointed to and need not be repeated every time the figure is mentioned.

Remarks

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

Attribute Values

In Elements

<abbrev> Abbreviation or Acronym; <ack> Acknowledgments; <address> Address/Contact Information; <aff> Affiliation; <alt-text> Alternate Title Text (For a Figure, Etc.); <app> Appendix; <bio> Biography; <boxed-text> Boxed Text; <caption> Caption of a Figure, Table, Etc.; <chem-struct> Chemical Structure (Display); <chem-struct-wrapper> Chemical Structure Wrapper; <citation> Citation; <col> Table Column (XHTML table model); <colgroup> Table Column Group (XHTML table model); <collab> Collaborative (Group) Author; <contract-num> Contract/Grant Number; <contract-sponsor> Contract/Grant Sponsor; <contrib> Contributor; <def> Definition List: Definition; <def-item> Definition List: Definition Item; <def-list> Definition List; <disp-formula> Formula, Display; <disp-quote> Quote, Displayed; <ext-link> External Link; <fig> Figure; <fn> Footnote; <glossary> Glossary Elements List; <graphic> Graphic; <inline-formula> Formula, Inline; <inline-graphic> Graphic, Inline; <inline-supplementary-material> Inline Supplementary Material; <institution> Institution Name: in an Address; <kwd> Keyword; <kwd-group> Keyword Group; <list> List; <list-item> List Item; <long-desc> Long Description; <media> Media Object; <mml:math> Math (MathML 2.0 DTD); <nlm-citation> NLM Citation Model; <p> Paragraph; <preformat> Preformatted Text; <ref> Reference Item; <related-article> Related Article Information; <sec> Section; <speech> Speech; <statement> Statement, Formal; <supplementary-material> Supplementary Material; <table> Table (XHTML table model); <table-wrap> Table Wrapper; <target> Target of an Internal Link; <tbody> Table Body (XHTML table model); <td> Table Data Cell (XHTML table model); <term> Definition List: Term; <tfoot> Table Footer (XHTML table model); <th> Table Header Cell (XHTML table model); <thead> Table Header (XHTML table model); <tr> Table Row (XHTML table model); <verse-group> Verse Form for Poetry; <xref> X(cross) Reference
Value Meaning
An XML identifier (ID) A unique identifier for the element. XML parsers can verify that an element pointing to one of these is pointing to a valid ID.
Restriction: This attribute may be specified if the element is used.