/[pub]/test/html.dtd
Suika

Contents of /test/html.dtd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sat Apr 9 01:02:10 1994 UTC (30 years, 1 month ago) by connolly
Branch: MAIN
Changes since 1.7: +275 -128 lines
* 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 <![ %HTML.linkRedundantInfo [ <!ENTITY % linkRedundantAttrs "
145 connolly 1.6 URN CDATA #IMPLIED -- universal resource number --
146    
147     TITLE CDATA #IMPLIED -- advisory only --
148 connolly 1.8 "> ]]>
149     <!ENTITY % linkRedundantAttrs "">
150 connolly 1.5
151 connolly 1.8 <![ %HTML.linkMethods [ <!ENTITY % linkMethodAttrs "
152 connolly 1.6 METHODS NAMES #IMPLIED -- supported public methods of the object:
153     TEXTSEARCH, GET, HEAD, ... --
154 connolly 1.8 "> ]]>
155     <!ENTITY % linkMethodAttrs "">
156 connolly 1.3
157 connolly 1.8 <!ENTITY % linkattributes
158     "NAME %anchor-name #IMPLIED
159     HREF %URI; #IMPLIED
160     %linkRelAttrs;
161     %linkRedundantAttrs;
162     %linkMethodAttrs;
163 connolly 1.6 ">
164    
165    
166 connolly 1.4 <!-- Document Element -->
167 connolly 1.2
168    
169 connolly 1.8 <![ %HTML.PLAINTEXT [ <!ENTITY % html-content "(HEAD, BODY), PLAINTEXT?"> ]]>
170     <!ENTITY % html-content "HEAD, BODY">
171     <!ELEMENT HTML O O (%html-content)>
172    
173     <![ %HTML.NEXTID [ <!ENTITY % head-content "TITLE? & ISINDEX? & LINK* & BASE?
174     & NEXTID?"> ]]>
175     <!ENTITY % head-content "TITLE & ISINDEX? & LINK* & BASE?">
176     <!ELEMENT HEAD O O (%head-content)>
177    
178     <![ %HTML.titleCDATA [ <!ENTITY % title-content "CDATA"> ]]>
179     <!ENTITY % title-content "(#PCDATA)">
180     <!ELEMENT TITLE - - %title-content
181 connolly 1.6 -- The TITLE element is not considered part of the flow of text.
182     It should be displayed, for example as the page header or
183     window title.
184     -->
185 connolly 1.2
186     <!ELEMENT ISINDEX - O EMPTY
187 connolly 1.6 -- WWW clients should offer the option to perform a search on
188     documents containing ISINDEX.
189     -->
190    
191 connolly 1.2 <!ELEMENT NEXTID - O EMPTY>
192 connolly 1.8 <!ATTLIST NEXTID N %anchor-name #REQUIRED
193 connolly 1.6 -- The number should be a name suitable for use
194     for the ID of a new element. When used, the value
195     has its numeric part incremented. EG Z67 becomes Z68
196     -->
197     <!ELEMENT LINK - O EMPTY>
198     <!ATTLIST LINK
199     %linkattributes>
200    
201 connolly 1.8 <!ELEMENT BASE - O EMPTY -- Reference context for URIs -->
202 connolly 1.6 <!ATTLIST BASE
203    
204 connolly 1.8 HREF %URI; #IMPLIED
205 connolly 1.6
206     >
207 connolly 1.8
208     <!ENTITY % font "TT | B | I | U ">
209     <!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | KEY | VAR | DFN | CITE">
210    
211     <![ %HTML.font-phrase [
212     <!ENTITY % obsolete-font "| %font">
213     <!ENTITY % obsolete-phrase "| %phrase">
214     ]]>
215     <!ENTITY % obsolete-font "">
216     <!ENTITY % obsolete-phrase "">
217     <![ %HTML.pSeparator [
218     <!ENTITY % obsolete-p "| P">
219     ]]>
220     <!ENTITY % obsolete-p "">
221 connolly 1.3
222 connolly 1.8 <!ENTITY % inline "%phrase %obsolete-font">
223     <!ENTITY % pre-inline "%font %obsolete-phrase %obsolete-p">
224 connolly 1.3
225 connolly 1.8 <!ENTITY % text "#PCDATA | IMG | %inline | BR %obsolete-p">
226 connolly 1.6
227     <!ENTITY % htext "A | %text" -- Plus links, no structure -->
228 connolly 1.4
229 connolly 1.8 <![ %HTML.font-phrase [ <!ENTITY % font-content "(%htext)+"> ]]>
230     <!ENTITY % font-content "#PCDATA">
231     <!ELEMENT (%font;) - - (%font-content;)>
232    
233     <!ELEMENT (%phrase;) - - (%htext)+>
234 connolly 1.5
235 connolly 1.8 <!ENTITY % pre "PRE | XMP | LISTING">
236 connolly 1.6
237 connolly 1.8 <![ %HTML.forms [ <!ENTITY % block-form "| FORM"> ]]>
238     <!ENTITY % block-form "">
239 connolly 1.6
240 connolly 1.8 <![ %HTML.pSeparator [
241     <!ENTITY % obsolete-htext "| %htext">
242     <!ENTITY % block-p "">
243     ]]>
244     <!ENTITY % obsolete-htext "| A">
245     <!ENTITY % block-p "| P ">
246 connolly 1.4
247 connolly 1.8 <!ENTITY % block "HR | %list | DL
248     | %pre | BLOCKQUOTE | ADDRESS
249     %block-form %block-p">
250    
251    
252     <!ENTITY % body-content "%heading | %block %obsolete-htext">
253     <!ELEMENT BODY O O (%body-content)*>
254    
255    
256     <!ELEMENT A - - (%heading|%block|%text)+ -(A)
257     -- @# Technically, this allows silliness like:
258     <H2><A>xyz<H1>h1</H1></A></H2>
259     The right way to do anchors outside of %htext is more like:
260     <as id=z1><H2>lkjlkj</h2><ae start=z1>
261     -->
262 connolly 1.4 <!ATTLIST A
263 connolly 1.6 %linkattributes;
264     >
265    
266     <!ELEMENT IMG - O EMPTY -- Embedded image -->
267     <!ATTLIST IMG
268 connolly 1.8 SRC %URI; #IMPLIED -- URI of document to embed --
269     ALT CDATA #IMPLIED
270     ALIGN (top|middle|bottom) #IMPLIED
271     ISMAP (ISMAP) #IMPLIED
272 connolly 1.6 >
273    
274    
275 connolly 1.8 <![ %HTML.pSeparator [ <!ENTITY % p-content "EMPTY"> ]]>
276     <!ENTITY % p-content "(%htext)+">
277     <!ELEMENT P - O %p-content>
278 connolly 1.6 <!ELEMENT HR - O EMPTY -- horizontal rule -->
279 connolly 1.8 <!ELEMENT BR - O EMPTY -- @# BR -> &br; -->
280 connolly 1.6
281     <!ELEMENT ( %heading ) - - (%htext;)+>
282    
283 connolly 1.8 <!ELEMENT DL - - (DT*, DD?)+>
284     <!ATTLIST DL
285     STYLE (COMPACT) #IMPLIED>
286    
287     <!ELEMENT DT - O (%htext)+>
288     <!ELEMENT DD - O (%htext|%block)+>
289    
290     <!ELEMENT (%list) - - (LI)+>
291 connolly 1.2
292 connolly 1.8 <!ELEMENT LI - O (%htext|%block)+>
293 connolly 1.2
294 connolly 1.8 <!ELEMENT BLOCKQUOTE - - ((%htext)+, ADDRESS?)+ -- @# Hmm... --
295 connolly 1.6 -- for quoting some other source -->
296 connolly 1.3
297 connolly 1.8 <!ELEMENT ADDRESS - - (%htext;)+>
298 connolly 1.2
299 connolly 1.8 <!ELEMENT PRE - - (#PCDATA|%pre-inline|A)+>
300 connolly 1.2 <!ATTLIST PRE
301 connolly 1.6 WIDTH NUMBER #implied
302 connolly 1.2 >
303    
304 connolly 1.6 <!-- Mnemonic character entities. -->
305 connolly 1.8
306     <!ENTITY % ISOlat1 PUBLIC
307     "ISO 8879:1986//ENTITIES Added Latin 1//EN">
308     %ISOlat1;
309    
310 connolly 1.6 <!ENTITY amp "&#38;" -- ampersand -->
311     <!ENTITY gt "&#62;" -- greater than -->
312     <!ENTITY lt "&#60;" -- less than -->
313 connolly 1.8 <!ENTITY nbsp "<? nonbreaking-space>">
314     <!-- @# should add entites for processing instructions
315     for line break, centering, etc. -->
316 connolly 1.6
317 connolly 1.3
318 connolly 1.8 <![ %HTML.litCDATA [ <!ENTITY % lit-content "CDATA"> ]]>
319     <!ENTITY % lit-content "RCDATA">
320     <!ELEMENT (%literal) - - %lit-content>
321 connolly 1.2
322 connolly 1.8 <![ %HTML.PLAINTEXT [
323 connolly 1.2 <!ELEMENT PLAINTEXT - O EMPTY>
324 connolly 1.8 ]]>
325    
326    
327     <!-- Forms -->
328     <![ %HTML.forms [
329    
330     <!ENTITY % HTTP-Method "(GET | POST)">
331     <!ELEMENT FORM - - (%body-content) -(FORM) +(INPUT|SELECT|TEXTAREA)>
332     <!ATTLIST FORM
333     ACTION %URI #REQUIRED
334     METHOD %HTTP-Method #IMPLIED -- @# MAILTO? --
335     ENCTYPE %Content-Type; #IMPLIED
336     >
337    
338     <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX |
339     RADIO | SUBMIT | RESET |
340     IMAGE | HIDDEN )">
341     <!ELEMENT INPUT - O EMPTY>
342     <!ATTLIST INPUT
343     TYPE %InputType #IMPLIED -- @# defaults to TEXT?? --
344     NAME CDATA #IMPLIED -- required for all but submit and reset --
345     VALUE CDATA #IMPLIED
346     SRC %URI #IMPLIED -- for image inputs --
347     STATE (CHECKED) #IMPLIED
348     SIZE CDATA #IMPLIED -- @# should be NUMBERS: delimit with space, not comma --
349     MAXLENGTH NUMBER #IMPLIED
350     ALIGN (top|middle|bottom|left|center|right) #IMPLIED --@#supported?--
351     >
352    
353     <!ELEMENT SELECT - - (OPTION+)>
354     <!ATTLIST SELECT
355     NAME CDATA #REQUIRED
356     SIZE NUMBER #IMPLIED
357     SELECTIONS (MULTIPLE) #IMPLIED
358     >
359    
360     <!ELEMENT OPTION - O (#PCDATA)>
361     <!ATTLIST OPTION
362     STATE (SELECTED) #IMPLIED
363     VALUE CDATA #IMPLIED
364     >
365    
366     <!ELEMENT TEXTAREA - - (#PCDATA)>
367     <!ATTLIST TEXTAREA
368     NAME CDATA #REQUIRED
369     ROWS NUMBER #REQUIRED -- @#implied? --
370     COLS NUMBER #REQUIRED
371     >
372     ]]>
373 connolly 1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24