next up previous contents
Next: Entities Up: The Document Type Definition Previous: Attribute declarations

Identifiers

In the DTD:

<!ATTLIST poem     id       ID     #IMPLIED  >

<!ELEMENT poemref  - O    EMPTY>

<!ATTLIST poemref  target   IDREF  #REQUIRED >

In the document:

    <anthology>
      <poem id="p001"><title>The SICK ROSE</title>
         Text of the poem
      </poem>
      <poem id="p002"><title>The Jabberwocky</title>
         Text of the poem
      </poem>
<!-- more poems go here -->
      <poem><title>Hail to thee, o SGML</title>
         This poem has no identifier
      </poem>
    </anthology>

<!-- and somewhere else in the document: -->

Blake's poem on the sick rose <POEMREF TARGET="p001">



Tomaz Erjavec
1/9/2000