
  <!ENTITY % paracontent "( #PCDATA
                            | em | strong | code
                            | m | sub | sup
                            | webref | docxref | javadoc | ref
                            | blockquote | blockcode | verbatim
                            | dl | ul | ol
                            | var | label | img
                           )*">

  <!-- %simplephrase; is used in some cases where the Starlink General
   !   (but not Programcode) DTD has span content instead.  Since the
   !   span model is (similar to) simplephrase, this would be easy to
   !   reconcile - either modify the general DTD to allow simplephrase
   !   content as well as span, or just wrap a span around the content
   !   of elements following this DTD which have content more complicated
   !   than CDATA. -->
  <!ENTITY % simplephrase "( #PCDATA
                             | em | strong | code 
                             | m | sub | sup
                             | webref | docxref | javadoc | ref
                             | var | label | img
                           )*">

  <!ENTITY % sectatts "tocleaf ( yes | no ) #IMPLIED">

  <!ELEMENT sun ( docinfo?, docbody )>
  <!ELEMENT docinfo ( title?, 
                      authorlist?,
                      softwareversion?,
                      docnumber?,
                      history?,
                      docdate?,
                      contactlist? )>
  <!ELEMENT title %simplephrase;>
  <!ELEMENT authorlist ( author* )>
  <!ELEMENT softwareversion ( #PCDATA )>
  <!ELEMENT docnumber ( #PCDATA )>
  <!ELEMENT docdate ( #PCDATA )>
  <!ELEMENT contactlist ( contact* )>
  <!ELEMENT contact %paracontent;>
  <!ELEMENT docbody ( blockcode?, abstract?, sect*, appendices? )>
  <!ELEMENT appendices ( sect+ )>
  <!ELEMENT abstract ( px* )>
  <!ELEMENT subhead ( title )>
  <!ELEMENT p %paracontent;>
  <!ELEMENT px %paracontent;>
  <!ELEMENT ul ( li* )>
  <!ELEMENT ol ( li* )>
  <!ELEMENT li %paracontent;>
  <!ELEMENT dl ( ( dt, dd? )* )>
  <!ELEMENT dt %paracontent;>
  <!ELEMENT dd ( p* )>
  <!ELEMENT em %paracontent;>
  <!ELEMENT strong %paracontent;>
  <!ELEMENT code %paracontent;>
  <!ELEMENT m ( #PCDATA | sub | sup )*>
  <!ELEMENT sup ( #PCDATA )>
  <!ELEMENT sub ( #PCDATA )>
  <!ELEMENT verbatim %paracontent;>
  <!ELEMENT hidden ( #PCDATA )>
  <!ELEMENT imports ( #PCDATA )>
  <!ELEMENT blockquote %paracontent;>
  <!ELEMENT var %paracontent;>
  <!ELEMENT label %paracontent;>
  <!ELEMENT history ( version* )>
  <!ELEMENT version ( px+ )>

  <!ELEMENT blockcode ( #PCDATA | imports | hidden )*>
  <!ATTLIST blockcode group NMTOKEN #IMPLIED>

  <!ELEMENT author ( #PCDATA )>
  <!ATTLIST author id ID #IMPLIED
                   email CDATA #IMPLIED
                   webpage CDATA #IMPLIED
                   affiliation CDATA #IMPLIED>

  <!ELEMENT img EMPTY>
  <!ATTLIST img src CDATA #REQUIRED
                alt CDATA #IMPLIED>

  <!-- Can't use SSN/70-style figurecontent element with ENTITY-type attribute
   !   here because there's no way of getting the external unparsed entity's
   !   URL back properly.  XSLT's unparsed-entity-uri() function looks 
   !   promising, but it turns it into an absolute URI, and a relative
   !   one is required for our purposes.  So use img instead.
   !-->
  <!ELEMENT figure ( caption?, figureimage )>
  <!ELEMENT caption ( px+ )>
  <!ELEMENT figureimage EMPTY>
  <!ATTLIST figureimage src CDATA #REQUIRED>

  <!ELEMENT ref %simplephrase;>
  <!ATTLIST ref id IDREF #REQUIRED
                plaintextref ( yes | no ) #IMPLIED>

  <!ELEMENT webref %simplephrase;>
  <!ATTLIST webref url CDATA #REQUIRED
                   plaintextref ( yes | no ) #IMPLIED>

  <!ELEMENT docxref %simplephrase;>
  <!ATTLIST docxref doc CDATA #REQUIRED
                    loc CDATA #IMPLIED
                    plaintextref ( yes | no ) #IMPLIED>

  <!ELEMENT javadoc %simplephrase;>
  <!ATTLIST javadoc class CDATA #REQUIRED
                    member CDATA #IMPLIED
                    docset CDATA #IMPLIED
                    codetext CDATA #IMPLIED>

  <!ELEMENT sect ( subhead?, ( p | figure | subsect )* )>
  <!ATTLIST sect id ID #IMPLIED
                 %sectatts;>

  <!ELEMENT subsect ( subhead?, ( p | figure | subsubsect )* )>
  <!ATTLIST subsect id ID #IMPLIED
                    %sectatts;>

  <!ELEMENT subsubsect ( subhead?, ( p | figure | subsubsubsect )* )>
  <!ATTLIST subsubsect id ID #IMPLIED
                       %sectatts;>

  <!ELEMENT subsubsubsect ( subhead?, ( p | figure )* )>
  <!ATTLIST subsubsubsect id ID #IMPLIED
                          %sectatts;>

