/[pub]/test/html.dtd
Suika

Contents of /test/html.dtd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue May 17 21:07:53 1994 UTC (29 years, 11 months ago) by connolly
Branch: MAIN
Changes since 1.11: +65 -45 lines
ISOlat1: changed entities from text entities (which get parsed
redundantly) to CDATA entities, which matches the semantics
of the implementation I'm developing.

README.html:
Removed references to doctype-mosaic.
Changed public identifier to reference no particular version of the
DTD (sneaky...)

Added links to a few interesting things.


html.decl:

removed "255 1 UNUSED" stuff, as per somebody's suggestion...
WEK or somebody... can't exactly remember.

Added comment about RE vs SEPCHAR stuff...


html.dtd:

* Added comments in the HTML.Prescriptive marked section
  moved bogus second public identifier to another file...

* Removed bogus isindexatend, HTML.GO, HTML.aEndOmissable stuff

* added bodyBlockOnly feature test

* changed KEY, U to feature-test-controlled elements

* added a @@ note about relative HREF's

* changed BASE HREF attr to be required

* changed amp, lt, etc. entities to be CDATA entities,
so they don't get parsed at runtime.

* moved obsolete elements after forms


optional.html:
updated w.r.t KEY, U

1 <!-- html.dtd
2
3 Document Type Definition for the HyperText Markup Language
4 as used by the World Wide Web application (HTML DTD).
5
6 $Id: html.dtd,v 1.11 1994/04/30 03:17:56 connolly Exp $
7
8 -->
9
10 <!-- Feature Test Entities -->
11
12 <!-- To use these, write your document like:
13 <!DOCTYPE HTML [
14 <!ENTITY % HTML.Optional "INCLUDE">
15 <!ENTITY % html PUBLIC "-//connolly hal.com//DTD WWW HTML 1.8//EN">
16 %html;
17 ]>
18 <TITLE>Here's my doc</TITLE>
19 <p>It uses lots of optional features
20
21 In practice, if you're using sgmls to validate your docs,
22 you can stick the <!DOCTYPE [...]> in a separate file and
23 validate with:
24 sgmls -s doctype.sgml foo.html
25 -->
26
27 <!ENTITY % HTML.Minimal "IGNORE">
28 <!ENTITY % HTML.Obsolete "IGNORE">
29 <!ENTITY % HTML.Prescriptive "IGNORE">
30
31 <![ %HTML.Minimal [
32 <!ENTITY % HTML.linkRelationships "IGNORE">
33 <!ENTITY % HTML.linkMethods "IGNORE">
34 <!ENTITY % HTML.linkRedundantInfo "IGNORE">
35 <!ENTITY % HTML.forms "IGNORE">
36 <!-- @@ nested lists -->
37 <!-- @@ phrases -->
38 <!-- @@ headers inside A -->
39 <!-- @@ nested phrases, fonts -->
40 ]]>
41
42 <![ %HTML.Obsolete [
43 <!ENTITY % HTML.titleCDATA "INCLUDE">
44 <!ENTITY % HTML.litCDATA "INCLUDE">
45 <!ENTITY % HTML.pSeparator "INCLUDE">
46 ]]>
47
48 <![ %HTML.Prescriptive [
49 <!--
50 This feature test entity prescribes that certain
51 idioms detract from the structural integrity of an
52 HTML document, and are therefore disallowed.
53 -->
54 <!ENTITY % HTML.font-phrase "IGNORE">
55 <!ENTITY % HTML.anchorNameCDATA "IGNORE">
56 <!ENTITY % HTML.PLAINTEXT "IGNORE">
57 <!ENTITY % HTML.bodyBlockOnly "INCLUDE">
58 ]]>
59
60 <!ENTITY HTML.Version
61 "-//connolly hal.com//DTD WWW HTML $Date 1994/04/19 17:24:06 $//EN"
62 -- public identifier for "default" version --
63 -- actually, take the $'s out to get the real public identifer, --
64 -- since $ is illegal in public identifier. When DTD stabilizes, --
65 -- we'll need to stop using RCS keywords to version the pub id --
66 >
67
68 <!ENTITY % HTML.bodyBlockOnly "IGNORE"
69 -- only allow block elements in the BODY element
70 This means all paragraphs need to start with a <P> tag.
71 -->
72
73 <!ENTITY % HTML.pSeparator "IGNORE"
74 -- use P element as paragraph separator, rather that container.
75 -->
76
77 <!ENTITY % HTML.linkRelationships "INCLUDE"
78 -- Adding markup to links to show the relationship between
79 ends of a link
80 see http://info.cern.ch/hypertext/WWW/MarkUp/Relationships.html
81 -->
82
83 <!ENTITY % HTML.linkMethods "INCLUDE"
84 -- Adding markup to links to show the methods supported
85 by the referent object
86 see http://info.cern.ch/hypertext/WWW/MarkUp/Elements/A.html
87 -->
88
89 <!ENTITY % HTML.linkRedundantInfo "INCLUDE"
90 -- Adding markup to links to give redundant information
91 like URN, content type, title...
92 -->
93
94 <!ENTITY % HTML.anchorNameCDATA "INCLUDE"
95 -- Anchor names should be distinct. SGML parser can validate
96 this if the NAME attribute of the A element is declared as ID.
97 But that restricts the syntax of an anchor name to an SGML name,
98 i.e. a letter followed by letters, numbers, periods and dashes,
99 up to NAMELEN (34) characters long.
100 -->
101
102 <!ENTITY % HTML.PLAINTEXT "INCLUDE"
103 -- Support for the <PLAINTEXT> tag as a sign of the
104 end of th HTML data stream and the beginning of a stream
105 of text/plain data
106 -->
107
108 <!ENTITY % HTML.titleCDATA "IGNORE"
109 -- Is the TITLE element #PCDATA, RCDATA, or CDATA content?
110 On Mosaic, it's #PCDATA, but in the linemode browser,
111 it's more like CDATA, but not quite.
112 -->
113
114 <!ENTITY % HTML.NEXTID "INCLUDE"
115 -- Used by the NeXT implementation to keep track of the
116 next anchor id to use
117 -->
118
119 <!ENTITY % HTML.font-phrase "INCLUDE"
120 -- allow B, I, TT, U outside PRE,
121 CITE, VAR, etc. inside PRE
122 -->
123
124 <!ENTITY % HTML.KEY "IGNORE"
125 -- There was once a KEY element, for keyboard keys, menu items,
126 buttons, etc. but it's not supported or widely documented
127 -->
128
129 <!ENTITY % HTML.U "IGNORE"
130 -- There was also a U element, but since it clashes with
131 the common pracitce of underlining hypertext links, it is
132 not widely supported
133 -->
134
135 <!ENTITY % HTML.litCDATA "IGNORE"
136 -- treat XMP, LISTING as CDATA, as per linemodeWWW
137 -->
138
139 <!ENTITY % HTML.forms "INCLUDE"
140 -- Support for forms as per
141 http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html
142 -->
143
144 <!-- DTD definitions -->
145
146 <!ENTITY % heading "H1|H2|H3|H4|H5|H6" >
147 <!ENTITY % list " UL | OL | DIR | MENU ">
148 <!ENTITY % literal " XMP | LISTING ">
149
150 <!ENTITY % URI "CDATA"
151 -- The term URI means a CDATA attribute
152 whose value is a Uniform Resource Identifier,
153 as defined by
154 "Universal Resource Identifiers" by Tim Berners-Lee
155 aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html
156
157 Note that CDATA attributes are limited by the LITLEN
158 capacity (1024 in the current version of html.decl),
159 so that URIs in HTML have a bounded length.
160
161 @@ Need to discuss relative addresses.
162 -->
163
164 <!ENTITY % Content-Type "CDATA"
165 -- meaning a MIME content type, as per RFC1521
166 -->
167
168 <![ %HTML.anchorNameCDATA [ <!ENTITY % anchor-name "CDATA"> ]]>
169 <!ENTITY % anchor-name "ID">
170
171 <![ %HTML.linkRelationships [ <!ENTITY % linkRelAttrs "
172 REL CDATA #IMPLIED -- forward relationship type --
173 REV CDATA #IMPLIED -- reversed relationship type
174 to referent data:
175
176 PARENT CHILD, SIBLING, NEXT, TOP,
177 DEFINITION, UPDATE, ORIGINAL etc. --
178 "> ]]>
179 <!ENTITY % linkRelAttrs "">
180
181 <![ %HTML.linkRedundantInfo [ <!ENTITY % linkRedundantAttrs "
182 URN CDATA #IMPLIED -- universal resource number --
183
184 TITLE CDATA #IMPLIED -- advisory only --
185 "> ]]>
186 <!ENTITY % linkRedundantAttrs "">
187
188 <![ %HTML.linkMethods [ <!ENTITY % linkMethodAttrs "
189 METHODS NAMES #IMPLIED -- supported public methods of the object:
190 TEXTSEARCH, GET, HEAD, ... --
191 "> ]]>
192 <!ENTITY % linkMethodAttrs "">
193
194 <!ENTITY % linkattributes
195 "NAME %anchor-name #IMPLIED
196 HREF %URI; #IMPLIED
197 %linkRelAttrs;
198 %linkRedundantAttrs;
199 %linkMethodAttrs;
200 ">
201
202
203 <!-- Document Element -->
204
205
206 <![ %HTML.PLAINTEXT [ <!ENTITY % obsolete-plaintext ", PLAINTEXT?"> ]]>
207 <!ENTITY % obsolete-plaintext "">
208
209 <!ENTITY % html-content "HEAD, BODY %obsolete-plaintext;">
210 <!ELEMENT HTML O O (%html-content)>
211
212 <![ %HTML.NEXTID [ <!ENTITY % head-content "TITLE? & ISINDEX? & LINK* & BASE?
213 & NEXTID?"> ]]>
214 <!ENTITY % head-content "TITLE & ISINDEX? & LINK* & BASE?">
215 <!ELEMENT HEAD O O (%head-content)>
216
217 <![ %HTML.titleCDATA [ <!ENTITY % title-content "CDATA"> ]]>
218 <!ENTITY % title-content "(#PCDATA)">
219 <!ELEMENT TITLE - - %title-content
220 -- The TITLE element is not considered part of the flow of text.
221 It should be displayed, for example as the page header or
222 window title.
223 -->
224
225 <!ELEMENT ISINDEX - O EMPTY
226 -- WWW clients should offer the option to perform a search on
227 documents containing ISINDEX.
228 -->
229
230 <!ELEMENT NEXTID - O EMPTY>
231 <!ATTLIST NEXTID N %anchor-name #REQUIRED
232 -- The number should be a name suitable for use
233 for the ID of a new element. When used, the value
234 has its numeric part incremented. EG Z67 becomes Z68
235 -->
236 <!ELEMENT LINK - O EMPTY>
237 <!ATTLIST LINK
238 %linkattributes>
239
240 <!ELEMENT BASE - O EMPTY -- Reference context for URIs -->
241 <!ATTLIST BASE
242
243 HREF %URI; #REQUIRED
244
245 >
246
247 <![ %HTML.KEY [
248 <!ENTITY % key-emph "| KEY">
249 ]]>
250 <!ENTITY % key-emph "">
251
252 <![ %HTML.U [
253 <!ENTITY % u-font "| U">
254 ]]>
255 <!ENTITY % u-font "">
256
257 <!ENTITY % font "TT | B | I %u-font">
258 <!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | DFN | CITE
259 | STRIKE %key-emph">
260
261
262 <![ %HTML.font-phrase [
263 <!ENTITY % obsolete-font "| %font">
264 <!ENTITY % obsolete-phrase "| %phrase">
265 ]]>
266 <!ENTITY % obsolete-font "">
267 <!ENTITY % obsolete-phrase "">
268 <![ %HTML.pSeparator [
269 <!ENTITY % obsolete-p "| P">
270 ]]>
271 <!ENTITY % obsolete-p "">
272
273 <!ENTITY % inline "%phrase %obsolete-font">
274 <!ENTITY % pre-inline "%font %obsolete-phrase %obsolete-p">
275
276 <!ENTITY % text "#PCDATA | IMG | %inline | BR %obsolete-p">
277
278 <!ENTITY % htext "A | %text" -- Plus links, no structure -->
279
280 <![ %HTML.font-phrase [ <!ENTITY % font-content "(%htext)+"> ]]>
281 <!ENTITY % font-content "#PCDATA">
282 <!ELEMENT (%font;) - - (%font-content;)>
283
284 <!ELEMENT (%phrase;) - - (%htext)+>
285
286 <!ENTITY % pre "PRE | XMP | LISTING">
287
288 <![ %HTML.forms [ <!ENTITY % block-form "| FORM | ISINDEX"> ]]>
289 <!ENTITY % block-form "">
290
291 <![ %HTML.pSeparator [
292 <!ENTITY % obsolete-htext "| %htext">
293 <!ENTITY % block-p "">
294 ]]>
295 <!ENTITY % obsolete-htext "| A">
296 <!ENTITY % block-p "| P ">
297
298 <!ENTITY % block "HR | %list | DL
299 | %pre | BLOCKQUOTE | ADDRESS
300 %block-form %block-p">
301
302
303 <![ %HTML.bodyBlockOnly [
304 <!ENTITY % current-htext "">
305 ]]>
306 <!ENTITY % current-htext "| %htext">
307
308 <!ENTITY % body-content "%heading | %block %current-htext">
309 <!ELEMENT BODY O O (%body-content)*>
310
311
312 <!ELEMENT A - - (%heading|%block|%text)+ -(A)
313 -- @# Technically, this allows silliness like:
314 <H2><A>xyz<H1>h1</H1></A></H2>
315 The right way to do anchors outside of %htext is more like:
316 <as id=z1><H2>lkjlkj</h2><ae start=z1>
317 -->
318 <!ATTLIST A
319 %linkattributes;
320 >
321
322 <!ELEMENT IMG - O EMPTY -- Embedded image -->
323 <!ATTLIST IMG
324 SRC %URI; #IMPLIED -- URI of document to embed --
325 ALT CDATA #IMPLIED
326 ALIGN (top|middle|bottom) #IMPLIED
327 ISMAP (ISMAP) #IMPLIED
328 >
329
330
331 <![ %HTML.pSeparator [ <!ENTITY % p-content "EMPTY"> ]]>
332 <!ENTITY % p-content "(%htext)+">
333 <!ELEMENT P - O %p-content>
334 <!ELEMENT HR - O EMPTY -- horizontal rule -->
335 <!ELEMENT BR - O EMPTY -- @# BR -> &br; -->
336
337 <!ELEMENT ( %heading ) - - (%htext;)+>
338
339 <!ELEMENT DL - - (DT*, DD?)+>
340 <!ATTLIST DL
341 COMPACT (COMPACT) #IMPLIED>
342
343 <!ELEMENT DT - O (%htext)+>
344 <!ELEMENT DD - O (%htext|%block)+>
345
346 <!ELEMENT (%list) - - (LI)+>
347
348 <!ELEMENT LI - O (%htext|%block)+>
349
350 <!ELEMENT BLOCKQUOTE - - (%htext|%block)+ -- @# Hmm... --
351 -- for quoting some other source -->
352
353 <!ELEMENT ADDRESS - - (%htext;|%block)+>
354
355 <!ELEMENT PRE - - (#PCDATA|%pre-inline|A)+>
356 <!ATTLIST PRE
357 WIDTH NUMBER #implied
358 >
359
360 <!-- Mnemonic character entities. -->
361
362 <!ENTITY % ISOlat1 PUBLIC
363 "ISO 8879:1986//ENTITIES Added Latin 1//EN">
364 %ISOlat1;
365
366 <!ENTITY #DEFAULT SDATA "&#38;unkown;" --display the markup-->
367 <!ENTITY amp CDATA "&#38;" -- ampersand -->
368 <!ENTITY gt CDATA "&#62;" -- greater than -->
369 <!ENTITY lt CDATA "&#60;" -- less than -->
370 <!ENTITY quot CDATA "&#34;" -- double quote -->
371
372 <!-- Processing Entities -->
373
374 <!ENTITY nbsp "<? nonbreaking-space>">
375 <!-- @# should add entites for processing instructions
376 for line break, centering, etc. -->
377
378
379 <!-- Forms -->
380 <![ %HTML.forms [
381
382 <!ENTITY % HTTP-Method "(GET | POST)">
383 <!ELEMENT FORM - - (%body-content)* -(FORM) +(INPUT|SELECT|TEXTAREA)>
384 <!ATTLIST FORM
385 ACTION %URI #REQUIRED
386 METHOD %HTTP-Method #IMPLIED -- @# MAILTO? --
387 ENCTYPE %Content-Type; #IMPLIED
388 >
389
390 <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX |
391 RADIO | SUBMIT | RESET |
392 IMAGE | HIDDEN )">
393 <!ELEMENT INPUT - O EMPTY>
394 <!ATTLIST INPUT
395 TYPE %InputType #IMPLIED -- @# defaults to TEXT?? --
396 NAME CDATA #IMPLIED -- required for all but submit and reset --
397 VALUE CDATA #IMPLIED
398 SRC %URI #IMPLIED -- for image inputs --
399 CHECKED (CHECKED) #IMPLIED
400 SIZE CDATA #IMPLIED -- @# should be NUMBERS: delimit with space, not comma --
401 MAXLENGTH NUMBER #IMPLIED
402 ALIGN (top|middle|bottom|left|center|right) #IMPLIED --@#supported?--
403 >
404
405 <!ELEMENT SELECT - - (OPTION+)>
406 <!ATTLIST SELECT
407 NAME CDATA #REQUIRED
408 SIZE NUMBER #IMPLIED
409 MULTIPLE (MULTIPLE) #IMPLIED
410 >
411
412 <!ELEMENT OPTION - O (#PCDATA)>
413 <!ATTLIST OPTION
414 SELECTED (SELECTED) #IMPLIED
415 VALUE CDATA #IMPLIED
416 >
417
418 <!ELEMENT TEXTAREA - - (#PCDATA)>
419 <!ATTLIST TEXTAREA
420 NAME CDATA #REQUIRED
421 ROWS NUMBER #REQUIRED -- @#implied? --
422 COLS NUMBER #REQUIRED
423 >
424 ]]>
425
426 <!-- Obsolete Elements -->
427
428 <![ %HTML.litCDATA [ <!ENTITY % lit-content "CDATA"> ]]>
429 <!ENTITY % lit-content "RCDATA">
430 <!ELEMENT (%literal) - - %lit-content>
431
432 <![ %HTML.PLAINTEXT [
433 <!ELEMENT PLAINTEXT - O EMPTY>
434 ]]>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24