Message-Id: <9207160335.AA24812@pixel.convex.com> To: www-talk@nxoc01.cern.ch Subject: HTML DTD enclosed Date: Wed, 15 Jul 92 22:35:19 CDT From: Dan Connolly <connolly@pixel.convex.com> <!-- html.dtd - document type declaration subset for HyperText Markup Language as defined by the World Wide Web project. 15 Jul 92 by connolly@convex.com See also: http://info.cern.ch/hypertext/WWW/MarkUp/Tags.html --> <!-- Terminal symbols --> <!ENTITY lt "<"> <!ENTITY gt ">"> <!ENTITY amp "&"> <!-- some existing html uses these. I think they meant & in stead of &. --> <!ENTITY lt. "<"> <!ENTITY gt. ">"> <!ENTITY amp. "&"> <!-- Non-ELEMENT symbols --> <!ENTITY % heading "H1|H2|H3|H4|H5|H6" > <!ENTITY % list "UL|OL|DIR|MENU|DL"> <!ENTITY % text "P|#PCDATA"> <!ENTITY % raw "XMP|LISTING"> <!-- PlainText is more than 8 characters, and changing the NAMELEN capacity involves including a lengthy SGML declaration in every HTML file. Besides: the semantics of PlainText can't be captured by real SGML anyway. --> <!ENTITY % body "%heading|%list|%text|%raw"> <!-- Document structure --> <!ELEMENT HTML O O ((TITLE? & NEXTID? & ISINDEX?), BODY, ADDRESS?)> <!ELEMENT TITLE - - (#PCDATA)> <!ELEMENT NEXTID - O EMPTY > <!ATTLIST NEXTID N NUMBER #REQUIRED> <!-- as noted in Tags.html, the conventional <NEXTID 10> is illegal. Use <NEXTID N=10> to comply with this DTD. --> <!ELEMENT ISINDEX - O EMPTY > <!ELEMENT BODY O O ((%heading), (%body)+) +(A)> <!-- The BODY element is necessary to avoid mixed content in the HTML element. Mixed content and optional elements don't mix very well. --> <!ELEMENT (%heading) - - (%text)+ --Tags.html says titles should fit on one line, but the browser handles paragraph breaks inside headings gracefully. --> <!ELEMENT (MENU|UL|OL|DIR) - - (LI+)> <!ELEMENT DL - - ((DT, DD)+)> <!ELEMENT LI - O (%text)+> <!ELEMENT DT - O (#PCDATA)+> <!ELEMENT DD - O (%text)+> <!ELEMENT ADDRESS - O (%text)+ +(A)> <!-- Tags.html says "This tag is for address information, signatures, etc, normally at the top or bottom of a document." Here, it is only allowed at the end of a document. --> <!ELEMENT (%raw) - - CDATA> <!-- BUG: tags.html says that you can put anything but </XMP> in the text of an XMP element. SGML says that ETAGO, "</" ends a CDATA section. --> <!ELEMENT P - O EMPTY -- paragraph SEPARATOR --> <!-- We could use this to let blank lines separate paragraphs <!ENTITY ptag STARTTAG "p"> <!SHORTREF bodymap "&#RS;&#RE;" ptag> <!USEMAP bodymap BODY;> --> <!ELEMENT A - - (%body)+> <!ATTLIST A HREF CDATA #IMPLIED -- attribute values with colons etc. must be quoted. -- NAME CDATA #IMPLIED TYPE CDATA #IMPLIED >