Parent Directory
|
Revision Log
* Added feature test entities for stuff that's handled different ways by different HTML implementations or specifications. * Removed %headelement, %bodyelement, %oldstyle, in favor of using OMITTAG to infer <HEAD>, <BODY> tags. * Changed %URL to %URI, and cited specification * Revamped %linkattributes in light of feature test entities * Revamped HTML, HEAD, elements in light of feature test entities * Anchor names may or may not be ID's based on the HTML.anchorNameID feature-test entity. * Changed %inline to be composed of %phrase and %font, where %font is controlled by %HTML.font-phrase * Changed EM, CODE, SAMP, etc. from (#PCDATA) to (%htext)+ * Added P, BR to %text * replaced %stext with %block and %htext * Changed BODY, A content models. * Added BR element * Changed DL content model to (DT*, DD?)+, changed DT, DD from EMPTY to containers with omissable end tags. This match all the cases I found during testing. * Changed OL, UL, etc. similarly * Replaced ISO latin 1 entity declarations with an entity reference * Added FORMs * Removed emacs local-variable cruft
| 1 | connolly | 1.7 | <!-- html.dtd |
| 2 | |||
| 3 | connolly | 1.6 | Document Type Definition for the HyperText Markup Language |
| 4 | as used by the World Wide Web application (HTML DTD). | ||
| 5 | connolly | 1.5 | |
| 6 | connolly | 1.8 | $Id: html.dtd,v 1.7 1994/04/01 19:21:25 connolly Exp $ |
| 7 | connolly | 1.2 | --> |
| 8 | |||
| 9 | connolly | 1.8 | <!-- Feature Test Entities --> |
| 10 | |||
| 11 | <!-- To use these, write your document like: | ||
| 12 | <!DOCTYPE HTML [ | ||
| 13 | <!ENTITY % HTML.Optional "INCLUDE"> | ||
| 14 | <!ENTITY % html PUBLIC "-//connolly hal.com//DTD WWW HTML 1.8//EN"> | ||
| 15 | %html; | ||
| 16 | ]> | ||
| 17 | <TITLE>Here's my doc</TITLE> | ||
| 18 | <p>It uses lots of optional features | ||
| 19 | |||
| 20 | In practice, if you're using sgmls to validate your docs, | ||
| 21 | you can stick the <!DOCTYPE [...]> in a separate file and | ||
| 22 | validate with: | ||
| 23 | sgmls -s doctype.sgml foo.html | ||
| 24 | --> | ||
| 25 | |||
| 26 | <!ENTITY % HTML.Minimal "IGNORE"> | ||
| 27 | <!ENTITY % HTML.Obsolete "IGNORE"> | ||
| 28 | |||
| 29 | <![ %HTML.Minimal [ | ||
| 30 | <!ENTITY % HTML.linkRelationships "IGNORE"> | ||
| 31 | <!ENTITY % HTML.linkMethods "IGNORE"> | ||
| 32 | <!ENTITY % HTML.linkRedundantInfo "IGNORE"> | ||
| 33 | <!ENTITY % HTML.forms "IGNORE"> | ||
| 34 | <!-- @@ nested lists --> | ||
| 35 | <!-- @@ phrases --> | ||
| 36 | ]]> | ||
| 37 | |||
| 38 | <![ %HTML.Obsolete [ | ||
| 39 | <!ENTITY % HTML.PLAINTEXT "INCLUDE"> | ||
| 40 | <!ENTITY % HTML.titleCDATA "INCLUDE"> | ||
| 41 | <!ENTITY % HTML.litCDATA "INCLUDE"> | ||
| 42 | <!ENTITY % HTML.NEXTID "INCLUDE"> | ||
| 43 | <!ENTITY % HTML.font-phrase "INCLUDE"> | ||
| 44 | <!ENTITY % HTML.anchorNameCDATA "INCLUDE"> | ||
| 45 | <!ENTITY % HTML.pSeparator "INCLUDE"> | ||
| 46 | ]]> | ||
| 47 | |||
| 48 | <!ENTITY % HTML.pSeparator "IGNORE" | ||
| 49 | -- use P element as paragraph separator, rather that container. | ||
| 50 | This means not all paragraphs need to start with a <P> tag. | ||
| 51 | --> | ||
| 52 | |||
| 53 | <!ENTITY % HTML.linkRelationships "INCLUDE" | ||
| 54 | -- Adding markup to links to show the relationship between | ||
| 55 | ends of a link | ||
| 56 | see http://info.cern.ch/hypertext/WWW/MarkUp/Relationships.html | ||
| 57 | --> | ||
| 58 | |||
| 59 | <!ENTITY % HTML.linkMethods "INCLUDE" | ||
| 60 | -- Adding markup to links to show the methods supported | ||
| 61 | by the referent object | ||
| 62 | see http://info.cern.ch/hypertext/WWW/MarkUp/Elements/A.html | ||
| 63 | --> | ||
| 64 | |||
| 65 | <!ENTITY % HTML.linkRedundantInfo "INCLUDE" | ||
| 66 | -- Adding markup to links to give redundant information | ||
| 67 | like URN, content type, title... | ||
| 68 | --> | ||
| 69 | |||
| 70 | <!ENTITY % HTML.anchorNameCDATA "IGNORE" | ||
| 71 | -- Anchor names should be distinct. SGML parser can validate | ||
| 72 | this if the NAME attribute of the A element is declared as ID. | ||
| 73 | But that restricts the syntax of an anchor name to an SGML name, | ||
| 74 | i.e. a letter followed by letters, numbers, periods and dashes, | ||
| 75 | up to NAMELEN (34) characters long. | ||
| 76 | --> | ||
| 77 | |||
| 78 | <!ENTITY % HTML.PLAINTEXT "IGNORE" | ||
| 79 | -- Support for the <PLAINTEXT> tag as a sign of the | ||
| 80 | end of th HTML data stream and the beginning of a stream | ||
| 81 | of text/plain data | ||
| 82 | --> | ||
| 83 | |||
| 84 | <!ENTITY % HTML.titleCDATA "IGNORE" | ||
| 85 | -- Is the TITLE element #PCDATA, RCDATA, or CDATA content? | ||
| 86 | On Mosaic, it's #PCDATA, but in the linemode browser, | ||
| 87 | it's more like CDATA, but not quite. | ||
| 88 | --> | ||
| 89 | |||
| 90 | <!ENTITY % HTML.NEXTID "IGNORE" | ||
| 91 | -- Used by the NeXT implementation to keep track of the | ||
| 92 | next anchor id to use | ||
| 93 | --> | ||
| 94 | |||
| 95 | <!ENTITY % HTML.font-phrase "IGNORE" | ||
| 96 | -- allow B, I, TT, U outside PRE, | ||
| 97 | CITE, VAR, etc. inside PRE | ||
| 98 | --> | ||
| 99 | |||
| 100 | <!ENTITY % HTML.litCDATA "IGNORE" | ||
| 101 | -- treat XMP, LISTING as CDATA, as per linemodeWWW | ||
| 102 | --> | ||
| 103 | |||
| 104 | <!ENTITY % HTML.forms "INCLUDE" | ||
| 105 | -- Support for forms as per | ||
| 106 | http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html | ||
| 107 | --> | ||
| 108 | |||
| 109 | connolly | 1.3 | <!-- DTD definitions --> |
| 110 | |||
| 111 | connolly | 1.2 | <!ENTITY % heading "H1|H2|H3|H4|H5|H6" > |
| 112 | connolly | 1.6 | <!ENTITY % list " UL | OL | DIR | MENU "> |
| 113 | <!ENTITY % literal " XMP | LISTING "> | ||
| 114 | connolly | 1.2 | |
| 115 | connolly | 1.8 | <!ENTITY % URI "CDATA" |
| 116 | -- The term URI means a CDATA attribute | ||
| 117 | whose value is a Uniform Resource Identifier, | ||
| 118 | as defined by | ||
| 119 | "Universal Resource Identifiers" by Tim Berners-Lee | ||
| 120 | aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html | ||
| 121 | |||
| 122 | Note that CDATA attributes are limited by the LITLEN | ||
| 123 | capacity (1024 in the current version of html.decl), | ||
| 124 | so that URIs in HTML have a bounded length. | ||
| 125 | --> | ||
| 126 | |||
| 127 | <!ENTITY % Content-Type "CDATA" | ||
| 128 | -- meaning a MIME content type, as per RFC1341 or any of its updates. | ||
| 129 | --> | ||
| 130 | connolly | 1.2 | |
| 131 | connolly | 1.8 | <![ %HTML.anchorNameCDATA [ <!ENTITY % anchor-name "CDATA"> ]]> |
| 132 | <!ENTITY % anchor-name "ID"> | ||
| 133 | connolly | 1.6 | |
| 134 | connolly | 1.8 | <![ %HTML.linkRelationships [ <!ENTITY % linkRelAttrs " |
| 135 | connolly | 1.6 | REL CDATA #IMPLIED -- forward relationship type -- |
| 136 | REV CDATA #IMPLIED -- reversed relationship type | ||
| 137 | to referent data: | ||
| 138 | |||
| 139 | PARENT CHILD, SIBLING, NEXT, TOP, | ||
| 140 | DEFINITION, UPDATE, ORIGINAL etc. -- | ||
| 141 | connolly | 1.8 | "> ]]> |
| 142 | <!ENTITY % linkRelAttrs ""> | ||
| 143 | connolly | 1.6 | |
| 144 | connolly | 1.8 |