1 |
<!-- html.dtd |
<!-- html.dtd |
2 |
|
|
3 |
Document Type Definition for the HyperText Markup Language |
Document Type Definition for the HyperText Markup Language (HTML DTD) |
|
as used by the World Wide Web (HTML DTD). |
|
4 |
|
|
5 |
$Id$ |
$Id$ |
6 |
|
|
7 |
Author: Daniel W. Connolly <connolly@hal.com> |
Author: Daniel W. Connolly <connolly@hal.com> |
8 |
See Also: http://www.hal.com/%7Econnolly/html-spec/HTML.html |
See Also: html.decl, html-0.dtd, html-1.dtd |
9 |
|
http://www.hal.com/%7Econnolly/html-spec/index.html |
10 |
http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html |
http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html |
11 |
--> |
--> |
12 |
|
|
13 |
<!ENTITY HTML.Version |
<!ENTITY % HTML.Version |
14 |
"-//W3O//DTD WWW HTML 2.0//EN" |
"+//ISBN 82-7640-037::WWW//DTD HTML//EN//2.0" |
|
-- public identifier for "current pracitice" version -- |
|
15 |
|
|
16 |
-- Typical usage: |
-- Typical usage: |
17 |
|
|
18 |
<!DOCTYPE HTML PUBLIC "-//W3O//DTD WWW HTML 2.0//EN"> |
<!DOCTYPE HTML PUBLIC "+//ISBN 82-7640-037::WWW//DTD HTML//EN"> |
19 |
<html> |
<html> |
20 |
... |
... |
21 |
</html> |
</html> |
23 |
> |
> |
24 |
|
|
25 |
|
|
26 |
<!-- Feature Test Entities --> |
<!-- Imported Names --> |
|
|
|
|
<!-- To use these, write your document like: |
|
|
<!DOCTYPE HTML [ |
|
|
<!ENTITY % HTML.Optional "INCLUDE"> |
|
|
<!ENTITY % html PUBLIC "-//connolly hal.com//DTD WWW HTML 1.8//EN"> |
|
|
%html; |
|
|
]> |
|
|
<TITLE>Here's my doc</TITLE> |
|
|
<p>It uses lots of optional features |
|
|
|
|
|
In practice, if you're using sgmls to validate your docs, |
|
|
you can stick the <!DOCTYPE [...]> in a separate file and |
|
|
validate with: |
|
|
sgmls -s doctype.sgml foo.html |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.Level0 "IGNORE"> |
|
|
<!ENTITY % HTML.Obsolete "IGNORE"> |
|
|
<!ENTITY % HTML.Prescriptive "IGNORE"> |
|
|
|
|
|
<![ %HTML.Level0 [ |
|
|
<!ENTITY % HTML.linkRelationships "IGNORE"> |
|
|
<!ENTITY % HTML.linkMethods "IGNORE"> |
|
|
<!ENTITY % HTML.linkRedundantInfo "IGNORE"> |
|
|
<!ENTITY % HTML.forms "IGNORE"> |
|
|
<!ENTITY % HTML.phrase "IGNORE"> |
|
|
<!ENTITY % HTML.NEXTID "IGNORE"> |
|
|
<!-- @# Are the following required for conformance? --> |
|
|
<!-- @# nested lists --> |
|
|
<!-- @# IMG --> |
|
|
<!-- @# headers inside A --> |
|
|
<!-- @# nested phrases, fonts --> |
|
|
]]> |
|
|
|
|
|
<![ %HTML.Obsolete [ |
|
|
<!ENTITY % HTML.titleCDATA "INCLUDE"> |
|
|
<!ENTITY % HTML.litCDATA "INCLUDE"> |
|
|
<!ENTITY % HTML.pSeparator "INCLUDE"> |
|
|
]]> |
|
|
|
|
|
<![ %HTML.Prescriptive [ |
|
|
<!-- |
|
|
This feature test entity prescribes that certain |
|
|
idioms detract from the structural integrity of an |
|
|
HTML document, and are therefore disallowed. |
|
|
--> |
|
|
<!ENTITY % HTML.font-phrase "IGNORE"> |
|
|
<!ENTITY % HTML.anchorNameCDATA "IGNORE"> |
|
|
<!ENTITY % HTML.PLAINTEXT "IGNORE"> |
|
|
<!ENTITY % HTML.bodyBlockOnly "INCLUDE"> |
|
|
]]> |
|
|
|
|
|
<!ENTITY % HTML.phrase "INCLUDE" |
|
|
-- phrase markup, ala TeXinfo: TT, EM, etc. |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.bodyBlockOnly "IGNORE" |
|
|
-- only allow block elements in the BODY element |
|
|
This means all paragraphs need to start with a <P> tag. |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.pSeparator "IGNORE" |
|
|
-- use P element as paragraph separator, rather that container. |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.linkRelationships "INCLUDE" |
|
|
-- Adding markup to links to show the relationship between |
|
|
ends of a link |
|
|
see http://info.cern.ch/hypertext/WWW/MarkUp/Relationships.html |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.linkMethods "INCLUDE" |
|
|
-- Adding markup to links to show the methods supported |
|
|
by the referent object |
|
|
see http://info.cern.ch/hypertext/WWW/MarkUp/Elements/A.html |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.linkRedundantInfo "INCLUDE" |
|
|
-- Adding markup to links to give redundant information |
|
|
like URN, content type, title... |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.anchorNameCDATA "INCLUDE" |
|
|
-- Anchor names should be distinct. SGML parser can validate |
|
|
this if the NAME attribute of the A element is declared as ID. |
|
|
But that restricts the syntax of an anchor name to an SGML name, |
|
|
i.e. a letter followed by letters, numbers, periods and dashes, |
|
|
up to NAMELEN (34) characters long. |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.PLAINTEXT "INCLUDE" |
|
|
-- Support for the <PLAINTEXT> tag as a sign of the |
|
|
end of th HTML data stream and the beginning of a stream |
|
|
of text/plain data |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.titleCDATA "IGNORE" |
|
|
-- Is the TITLE element #PCDATA, RCDATA, or CDATA content? |
|
|
On Mosaic, it's #PCDATA, but in the linemode browser, |
|
|
it's more like CDATA, but not quite. |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.NEXTID "INCLUDE" |
|
|
-- Used by the NeXT implementation to keep track of the |
|
|
next anchor id to use |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.font-phrase "INCLUDE" |
|
|
-- allow B, I, TT, U outside PRE, |
|
|
CITE, VAR, etc. inside PRE |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.KEY "IGNORE" |
|
|
-- There was once a KEY element, for keyboard keys, menu items, |
|
|
buttons, etc. but it's not supported or widely documented |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.U "IGNORE" |
|
|
-- There was also a U element, but since it clashes with |
|
|
the common pracitce of underlining hypertext links, it is |
|
|
not widely supported |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.litCDATA "IGNORE" |
|
|
-- treat XMP, LISTING as CDATA, as per linemodeWWW |
|
|
--> |
|
|
|
|
|
<!ENTITY % HTML.forms "INCLUDE" |
|
|
-- Support for forms as per |
|
|
http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html |
|
|
--> |
|
|
|
|
|
<!-- DTD definitions --> |
|
|
|
|
|
<!ENTITY % heading "H1|H2|H3|H4|H5|H6" > |
|
|
<!ENTITY % list " UL | OL | DIR | MENU "> |
|
|
<!ENTITY % literal " XMP | LISTING "> |
|
|
|
|
|
<!ENTITY % URI "CDATA" |
|
|
-- The term URI means a CDATA attribute |
|
|
whose value is a Uniform Resource Identifier, |
|
|
as defined by |
|
|
"Universal Resource Identifiers" by Tim Berners-Lee |
|
|
aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html |
|
|
|
|
|
Note that CDATA attributes are limited by the LITLEN |
|
|
capacity (1024 in the current version of html.decl), |
|
|
so that URIs in HTML have a bounded length. |
|
|
|
|
|
--> |
|
27 |
|
|
28 |
<!ENTITY % Content-Type "CDATA" |
<!ENTITY % Content-Type "CDATA" |
29 |
-- meaning a MIME content type, as per RFC1521 |
-- meaning a MIME content type, as per RFC1521 |
30 |
--> |
--> |
31 |
|
|
32 |
<![ %HTML.anchorNameCDATA [ <!ENTITY % anchor-name "CDATA"> ]]> |
<!ENTITY % HTTP-Method "GET | POST"> |
|
<!ENTITY % anchor-name "ID"> |
|
|
|
|
|
<![ %HTML.linkRelationships [ <!ENTITY % linkRelAttrs " |
|
|
REL CDATA #IMPLIED -- forward relationship type -- |
|
|
REV CDATA #IMPLIED -- reversed relationship type |
|
|
to referent data: |
|
|
|
|
|
PARENT CHILD, SIBLING, NEXT, TOP, |
|
|
DEFINITION, UPDATE, ORIGINAL etc. -- |
|
|
"> ]]> |
|
|
<!ENTITY % linkRelAttrs ""> |
|
|
|
|
|
<![ %HTML.linkRedundantInfo [ <!ENTITY % linkRedundantAttrs " |
|
|
URN CDATA #IMPLIED -- universal resource number -- |
|
|
|
|
|
TITLE CDATA #IMPLIED -- advisory only -- |
|
|
"> ]]> |
|
|
<!ENTITY % linkRedundantAttrs ""> |
|
|
|
|
|
<![ %HTML.linkMethods [ <!ENTITY % linkMethodAttrs " |
|
|
METHODS NAMES #IMPLIED -- supported public methods of the object: |
|
|
TEXTSEARCH, GET, HEAD, ... -- |
|
|
"> ]]> |
|
|
<!ENTITY % linkMethodAttrs ""> |
|
|
|
|
|
<!ENTITY % linkattributes |
|
|
"NAME %anchor-name #IMPLIED |
|
|
HREF %URI; #IMPLIED |
|
|
%linkRelAttrs; |
|
|
%linkRedundantAttrs; |
|
|
%linkMethodAttrs; |
|
|
"> |
|
|
|
|
|
|
|
|
<!-- Document Element --> |
|
|
|
|
|
|
|
|
<![ %HTML.PLAINTEXT [ <!ENTITY % obsolete-plaintext ", PLAINTEXT?"> ]]> |
|
|
<!ENTITY % obsolete-plaintext ""> |
|
|
|
|
|
<!ENTITY % html-content "HEAD, BODY %obsolete-plaintext;"> |
|
|
<!ELEMENT HTML O O (%html-content)> |
|
|
|
|
|
<![ %HTML.NEXTID [ <!ENTITY % head-content "TITLE? & ISINDEX? & LINK* & BASE? |
|
|
& NEXTID?"> ]]> |
|
|
<!ENTITY % head-content "TITLE & ISINDEX? & LINK* & BASE?"> |
|
|
<!ELEMENT HEAD O O (%head-content)> |
|
|
|
|
|
<![ %HTML.titleCDATA [ <!ENTITY % title-content "CDATA"> ]]> |
|
|
<!ENTITY % title-content "(#PCDATA)"> |
|
|
<!ELEMENT TITLE - - %title-content |
|
|
-- The TITLE element is not considered part of the flow of text. |
|
|
It should be displayed, for example as the page header or |
|
|
window title. |
|
|
--> |
|
|
|
|
|
<!ELEMENT ISINDEX - O EMPTY |
|
|
-- WWW clients should offer the option to perform a search on |
|
|
documents containing ISINDEX. |
|
|
--> |
|
|
|
|
|
<!ELEMENT NEXTID - O EMPTY> |
|
|
<!ATTLIST NEXTID N %anchor-name #REQUIRED |
|
|
-- The number should be a name suitable for use |
|
|
for the ID of a new element. When used, the value |
|
|
has its numeric part incremented. EG Z67 becomes Z68 |
|
|
--> |
|
|
<!ELEMENT LINK - O EMPTY> |
|
|
<!ATTLIST LINK |
|
|
%linkattributes> |
|
|
|
|
|
<!ELEMENT BASE - O EMPTY -- Reference context for URIs --> |
|
|
<!ATTLIST BASE |
|
|
|
|
|
HREF %URI; #REQUIRED |
|
|
|
|
|
> |
|
|
|
|
|
<![ %HTML.KEY [ |
|
|
<!ENTITY % key-emph "| KEY"> |
|
|
]]> |
|
|
<!ENTITY % key-emph ""> |
|
|
|
|
|
<![ %HTML.U [ |
|
|
<!ENTITY % u-font "| U"> |
|
|
]]> |
|
|
<!ENTITY % u-font ""> |
|
|
|
|
|
<!ENTITY % font "TT | B | I %u-font"> |
|
|
<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | DFN | CITE |
|
|
| STRIKE %key-emph"> |
|
|
|
|
|
|
|
|
<![ %HTML.font-phrase [ |
|
|
<!ENTITY % obsolete-font "| %font"> |
|
|
<!ENTITY % obsolete-phrase "| %phrase"> |
|
|
]]> |
|
|
<!ENTITY % obsolete-font ""> |
|
|
<!ENTITY % obsolete-phrase ""> |
|
|
<![ %HTML.pSeparator [ |
|
|
<!ENTITY % obsolete-p "| P"> |
|
|
]]> |
|
|
<!ENTITY % obsolete-p ""> |
|
|
|
|
|
<!ENTITY % inline "%phrase %obsolete-font"> |
|
|
<!ENTITY % pre-inline "%font %obsolete-phrase %obsolete-p"> |
|
|
|
|
|
<!ENTITY % inline ""> |
|
|
<!ENTITY % pre-inline ""> |
|
|
|
|
|
<!ENTITY % text "#PCDATA | IMG | %inline | BR %obsolete-p"> |
|
|
|
|
|
<!ENTITY % htext "A | %text" -- Plus links, no structure --> |
|
|
|
|
|
<![ %HTML.font-phrase [ <!ENTITY % font-content "(%htext)+"> ]]> |
|
|
<!ENTITY % font-content "#PCDATA"> |
|
|
<!ELEMENT (%font;) - - (%font-content;)> |
|
|
|
|
|
<![ %HTML.phrase [ |
|
|
<!ELEMENT (%phrase;) - - (%htext)+> |
|
|
]]> |
|
|
|
|
|
<!ENTITY % pre "PRE | XMP | LISTING"> |
|
|
|
|
|
<![ %HTML.forms [ <!ENTITY % block-form "| FORM | ISINDEX"> ]]> |
|
|
<!ENTITY % block-form ""> |
|
|
|
|
|
<![ %HTML.pSeparator [ |
|
|
<!ENTITY % obsolete-htext "| %htext"> |
|
|
<!ENTITY % block-p ""> |
|
|
]]> |
|
|
<!ENTITY % obsolete-htext "| A"> |
|
|
<!ENTITY % block-p "| P "> |
|
|
|
|
|
<!ENTITY % block "HR | %list | DL |
|
|
| %pre | BLOCKQUOTE | ADDRESS |
|
|
%block-form %block-p"> |
|
|
|
|
|
|
|
|
<![ %HTML.bodyBlockOnly [ |
|
|
<!ENTITY % current-htext ""> |
|
|
]]> |
|
|
<!ENTITY % current-htext "| %htext"> |
|
|
|
|
|
<!ENTITY % body-content "%heading | %block %current-htext"> |
|
|
<!ELEMENT BODY O O (%body-content)*> |
|
|
|
|
|
|
|
|
<!ELEMENT A - - (%heading|%block|%text)+ -(A) |
|
|
-- @# Technically, this allows silliness like: |
|
|
<H2><A>xyz<H1>h1</H1></A></H2> |
|
|
The right way to do anchors outside of %htext is more like: |
|
|
<as id=z1><H2>lkjlkj</h2><ae start=z1> |
|
|
--> |
|
|
<!ATTLIST A |
|
|
%linkattributes; |
|
|
> |
|
|
|
|
|
<!ELEMENT IMG - O EMPTY -- Embedded image --> |
|
|
<!ATTLIST IMG |
|
|
SRC %URI; #IMPLIED -- URI of document to embed -- |
|
|
ALT CDATA #IMPLIED |
|
|
ALIGN (top|middle|bottom) #IMPLIED |
|
|
ISMAP (ISMAP) #IMPLIED |
|
|
> |
|
33 |
|
|
34 |
|
|
35 |
<![ %HTML.pSeparator [ <!ENTITY % p-content "EMPTY"> ]]> |
<!-- Include level 1 DTD + block extensions --> |
|
<!ENTITY % p-content "(%htext)+"> |
|
|
<!ELEMENT P - O %p-content> |
|
|
<!ELEMENT HR - O EMPTY -- horizontal rule --> |
|
|
<!ELEMENT BR - O EMPTY -- @# BR -> &br; --> |
|
36 |
|
|
37 |
<!ELEMENT ( %heading ) - - (%htext;)+> |
<!ENTITY % block-2 "| FORM | ISINDEX"> |
38 |
|
|
39 |
<!ELEMENT DL - - (DT*, DD?)+> |
<!ENTITY % html-1 PUBLIC "+//ISBN 82-7640-037::WWW//DTD HTML Level 1//EN//2.0"> |
40 |
<!ATTLIST DL |
%html-1; |
|
COMPACT (COMPACT) #IMPLIED> |
|
|
|
|
|
<!ELEMENT DT - O (%htext)+> |
|
|
<!ELEMENT DD - O (%htext|%block)+> |
|
|
|
|
|
<!ELEMENT (%list) - - (LI)+> |
|
|
|
|
|
<!ELEMENT LI - O (%htext|%block)+> |
|
|
|
|
|
<!ELEMENT BLOCKQUOTE - - (%htext|%block)+ -- @# Hmm... -- |
|
|
-- for quoting some other source --> |
|
|
|
|
|
<!ELEMENT ADDRESS - - (%htext;|%block)+> |
|
|
|
|
|
<!ELEMENT PRE - - (#PCDATA|%pre-inline|A)+> |
|
|
<!ATTLIST PRE |
|
|
WIDTH NUMBER #implied |
|
|
> |
|
|
|
|
|
<!-- Mnemonic character entities. --> |
|
|
|
|
|
<!ENTITY % ISOlat1 PUBLIC |
|
|
"ISO 8879:1986//ENTITIES Added Latin 1//EN"> |
|
|
%ISOlat1; |
|
|
|
|
|
<!ENTITY #DEFAULT SDATA "&unkown;" --display the markup--> |
|
|
<!ENTITY amp CDATA "&" -- ampersand --> |
|
|
<!ENTITY gt CDATA ">" -- greater than --> |
|
|
<!ENTITY lt CDATA "<" -- less than --> |
|
|
<!ENTITY quot CDATA """ -- double quote --> |
|
|
|
|
|
<!-- Processing Entities --> |
|
|
|
|
|
<!ENTITY nbsp "<? nonbreaking-space>"> |
|
|
<!-- @# should add entites for processing instructions |
|
|
for line break, centering, etc. --> |
|
41 |
|
|
42 |
|
|
43 |
<!-- Forms --> |
<!-- Forms --> |
|
<![ %HTML.forms [ |
|
44 |
|
|
45 |
<!ENTITY % HTTP-Method "(GET | POST)"> |
<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> |
|
<!ELEMENT FORM - - (%body-content)* -(FORM) +(INPUT|SELECT|TEXTAREA)> |
|
46 |
<!ATTLIST FORM |
<!ATTLIST FORM |
47 |
ACTION %URI #REQUIRED |
ACTION %URI #REQUIRED |
48 |
METHOD %HTTP-Method #IMPLIED -- @# MAILTO? -- |
METHOD (%HTTP-Method) GET |
49 |
ENCTYPE %Content-Type; #IMPLIED |
ENCTYPE %Content-Type; "application/x-www-form-urlencoded" |
50 |
> |
> |
51 |
|
|
52 |
<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | |
<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | |
54 |
IMAGE | HIDDEN )"> |
IMAGE | HIDDEN )"> |
55 |
<!ELEMENT INPUT - O EMPTY> |
<!ELEMENT INPUT - O EMPTY> |
56 |
<!ATTLIST INPUT |
<!ATTLIST INPUT |
57 |
TYPE %InputType #IMPLIED -- @# defaults to TEXT?? -- |
TYPE %InputType TEXT |
58 |
NAME CDATA #IMPLIED -- required for all but submit and reset -- |
NAME CDATA #IMPLIED -- required for all but submit and reset -- |
59 |
VALUE CDATA #IMPLIED |
VALUE CDATA #IMPLIED |
60 |
SRC %URI #IMPLIED -- for image inputs -- |
SRC %URI #IMPLIED -- for image inputs -- |
61 |
CHECKED (CHECKED) #IMPLIED |
CHECKED (CHECKED) #IMPLIED |
62 |
SIZE CDATA #IMPLIED -- @# should be NUMBERS: delimit with space, not comma -- |
SIZE CDATA #IMPLIED -- like NUMBERS, |
63 |
|
but delimited with comma, not space -- |
64 |
MAXLENGTH NUMBER #IMPLIED |
MAXLENGTH NUMBER #IMPLIED |
65 |
ALIGN (top|middle|bottom|left|center|right) #IMPLIED --@#supported?-- |
ALIGN (top|middle|bottom) #IMPLIED |
66 |
> |
> |
67 |
|
|
68 |
<!ELEMENT SELECT - - (OPTION+)> |
<!ELEMENT SELECT - - (OPTION+)> |
81 |
<!ELEMENT TEXTAREA - - (#PCDATA)> |
<!ELEMENT TEXTAREA - - (#PCDATA)> |
82 |
<!ATTLIST TEXTAREA |
<!ATTLIST TEXTAREA |
83 |
NAME CDATA #REQUIRED |
NAME CDATA #REQUIRED |
84 |
ROWS NUMBER #REQUIRED -- @#implied? -- |
ROWS NUMBER #REQUIRED |
85 |
COLS NUMBER #REQUIRED |
COLS NUMBER #REQUIRED |
86 |
> |
> |
|
]]> |
|
87 |
|
|
|
<!-- Obsolete Elements --> |
|
88 |
|
|
|
<![ %HTML.litCDATA [ <!ENTITY % lit-content "CDATA"> ]]> |
|
|
<!ENTITY % lit-content "RCDATA"> |
|
|
<!ELEMENT (%literal) - - %lit-content> |
|
89 |
|
|
|
<![ %HTML.PLAINTEXT [ |
|
|
<!ELEMENT PLAINTEXT - O EMPTY> |
|
|
]]> |
|