next up previous contents
Next: External DTDs Up: Standards for Language Encoding Previous: Marked Sections

SGML Documents

A complete document:

<!DOCTYPE anthology [
    <!ELEMENT anthology   - -  (poem+)>
    <!ELEMENT poem        - -  (title?, stanza+)>
    <!ELEMENT title       - O  (#PCDATA) >
    <!ELEMENT stanza      - O  (line+)   >
    <!ELEMENT line        - -  (#PCDATA) >
]>
    <anthology>
      <poem><title>The SICK ROSE</title>
         <stanza>
              <line>O Rose thou art sick.</line>
              <line>The invisible worm,</line>
              <line>That flies in the night</line>
              <line>In the howling storm:</line>
         <stanza>
              <line>Has found out thy bed</line>
              <line>Of crimson joy:</line>
              <line>And his dark secret love</line>
              <line>Does thy life destroy.</line>
      </poem>
    </anthology>



 

Tomaz Erjavec
1/9/2000