/[pub]/test/html.dtd
Suika

Contents of /test/html.dtd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide 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 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.12 $Id: html.dtd,v 1.11 1994/04/30 03:17:56 connolly Exp $
7 connolly 1.11
8 connolly 1.2 -->
9    
10 connolly 1.8 <!-- 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 connolly 1.11 <!ENTITY % HTML.Prescriptive "IGNORE">
30 connolly 1.8
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 connolly 1.11 <!-- @@ headers inside A -->
39     <!-- @@ nested phrases, fonts -->
40 connolly 1.8 ]]>
41    
42     <![ %HTML.Obsolete [
43     <!ENTITY % HTML.titleCDATA "INCLUDE">
44     <!ENTITY % HTML.litCDATA "INCLUDE">
45     <!ENTITY % HTML.pSeparator "INCLUDE">
46     ]]>
47    
48 connolly 1.11 <![ %HTML.Prescriptive [
49 connolly 1.12 <!--
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 connolly 1.11 <!ENTITY % HTML.font-phrase "IGNORE">
55     <!ENTITY % HTML.anchorNameCDATA "IGNORE">
56     <!ENTITY % HTML.PLAINTEXT "IGNORE">
57 connolly 1.12 <!ENTITY % HTML.bodyBlockOnly "INCLUDE">
58 connolly 1.11 ]]>
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 connolly 1.12 <!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 connolly 1.9
73 connolly 1.8 <!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 connolly 1.11 <!ENTITY % HTML.anchorNameCDATA "INCLUDE"
95 connolly 1.8 -- 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 connolly 1.11 <!ENTITY % HTML.PLAINTEXT "INCLUDE"
103 connolly 1.8 -- 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 connolly 1.9 <!ENTITY % HTML.NEXTID "INCLUDE"
115 connolly 1.8 -- Used by the NeXT implementation to keep track of the
116     next anchor id to use
117     -->
118    
119 connolly 1.11 <!ENTITY % HTML.font-phrase "INCLUDE"
120 connolly 1.8 -- allow B, I, TT, U outside PRE,
121     CITE, VAR, etc. inside PRE
122     -->
123    
124 connolly 1.12 <!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 connolly 1.8 <!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 connolly 1.3 <!-- DTD definitions -->
145    
146 connolly 1.2 <!ENTITY % heading "H1|H2|H3|H4|H5|H6" >
147 connolly 1.6 <!ENTITY % list " UL | OL | DIR | MENU ">
148     <!ENTITY % literal " XMP | LISTING ">
149 connolly 1.2
150 connolly 1.8 <!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 connolly 1.12
161     @@ Need to discuss relative addresses.
162 connolly 1.8 -->
163    
164     <!ENTITY % Content-Type "CDATA"
165 connolly 1.12 -- meaning a MIME content type, as per RFC1521
166 connolly 1.8 -->
167 connolly 1.2
168 connolly 1.8 <![ %HTML.anchorNameCDATA [ <!ENTITY % anchor-name "CDATA"> ]]>
169     <!ENTITY % anchor-name "ID">
170 connolly 1.6
171 connolly 1.8 <![ %HTML.linkRelationships [ <!ENTITY % linkRelAttrs "
172 connolly 1.6 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 connolly 1.8 "> ]]>
179     <!ENTITY % linkRelAttrs "">
180 connolly 1.6
181 connolly 1.8 <![ %HTML.linkRedundantInfo [ <!ENTITY % linkRedundantAttrs "
182 connolly 1.6 URN CDATA #IMPLIED -- universal resource number --
183    
184     TITLE CDATA #IMPLIED -- advisory only --
185 connolly 1.8 "> ]]>
186     <!ENTITY % linkRedundantAttrs "">
187 connolly 1.5
188 connolly 1.8 <![ %HTML.linkMethods [ <!ENTITY % linkMethodAttrs "
189 connolly 1.6 METHODS NAMES #IMPLIED -- supported public methods of the object:
190     TEXTSEARCH, GET, HEAD, ... --
191 connolly 1.8 "> ]]>
192     <!ENTITY % linkMethodAttrs "">
193 connolly 1.3
194 connolly 1.8 <!ENTITY % linkattributes
195     "NAME %anchor-name #IMPLIED
196     HREF %URI; #IMPLIED
197     %linkRelAttrs;
198     %linkRedundantAttrs;
199     %linkMethodAttrs;
200 connolly 1.6 ">
201    
202    
203 connolly 1.4 <!-- Document Element -->
204 connolly 1.2
205    
206 connolly 1.9 <![ %HTML.PLAINTEXT [ <!ENTITY % obsolete-plaintext ", PLAINTEXT?"> ]]>
207     <!ENTITY % obsolete-plaintext "">
208    
209 connolly 1.12 <!ENTITY % html-content "HEAD, BODY %obsolete-plaintext;">
210 connolly 1.8 <!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 connolly 1.6 -- 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 connolly 1.2
225     <!ELEMENT ISINDEX - O EMPTY
226 connolly 1.6 -- WWW clients should offer the option to perform a search on
227     documents containing ISINDEX.
228     -->
229    
230 connolly 1.2 <!ELEMENT NEXTID - O EMPTY>
231 connolly 1.8 <!ATTLIST NEXTID N %anchor-name #REQUIRED
232 connolly 1.6 -- 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 connolly 1.8 <!ELEMENT BASE - O EMPTY -- Reference context for URIs -->
241 connolly 1.6 <!ATTLIST BASE
242    
243 connolly 1.12 HREF %URI; #REQUIRED
244 connolly 1.6
245     >
246 connolly 1.8
247 connolly 1.12 <![ %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 connolly 1.8
261 connolly 1.12
262 connolly 1.8 <![ %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 connolly 1.3
273 connolly 1.8 <!ENTITY % inline "%phrase %obsolete-font">
274     <!ENTITY % pre-inline "%font %obsolete-phrase %obsolete-p">
275 connolly 1.3
276 connolly 1.12 <!ENTITY % text "#PCDATA | IMG | %inline | BR %obsolete-p">
277 connolly 1.6
278     <!ENTITY % htext "A | %text" -- Plus links, no structure -->
279 connolly 1.4
280 connolly 1.8 <![ %HTML.font-phrase [ <!ENTITY % font-content "(%htext)+"> ]]>
281     <!ENTITY % font-content "#PCDATA">
282     <!ELEMENT (%font;) - - (%font-content;)>
283    
284     <!ELEMENT (%phrase;) - - (%htext)+>
285 connolly 1.5
286 connolly 1.8 <!ENTITY % pre "PRE | XMP | LISTING">
287 connolly 1.6
288 connolly 1.9 <![ %HTML.forms [ <!ENTITY % block-form "| FORM | ISINDEX"> ]]>
289 connolly 1.8 <!ENTITY % block-form "">
290 connolly 1.6
291 connolly 1.8 <![ %HTML.pSeparator [
292     <!ENTITY % obsolete-htext "| %htext">
293     <!ENTITY % block-p "">
294     ]]>
295     <!ENTITY % obsolete-htext "| A">
296     <!ENTITY % block-p "| P ">
297 connolly 1.4
298 connolly 1.8 <!ENTITY % block "HR | %list | DL
299     | %pre | BLOCKQUOTE | ADDRESS
300     %block-form %block-p">
301    
302    
303 connolly 1.12 <![ %HTML.bodyBlockOnly [
304     <!ENTITY % current-htext "">
305     ]]>
306     <!ENTITY % current-htext "| %htext">
307    
308     <!ENTITY % body-content "%heading | %block %current-htext">
309 connolly 1.8 <!ELEMENT BODY O O (%body-content)*>
310    
311    
312 connolly 1.12 <!ELEMENT A - - (%heading|%block|%text)+ -(A)
313 connolly 1.8 -- @# 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 connolly 1.4 <!ATTLIST A
319 connolly 1.6 %linkattributes;
320     >
321    
322     <!ELEMENT IMG - O EMPTY -- Embedded image -->
323     <!ATTLIST IMG
324 connolly 1.8 SRC %URI; #IMPLIED -- URI of document to embed --
325     ALT CDATA #IMPLIED
326     ALIGN (top|middle|bottom) #IMPLIED
327     ISMAP (ISMAP) #IMPLIED
328 connolly 1.6 >
329    
330    
331 connolly 1.8 <![ %HTML.pSeparator [ <!ENTITY % p-content "EMPTY"> ]]>
332     <!ENTITY % p-content "(%htext)+">
333     <!ELEMENT P - O %p-content>
334 connolly 1.6 <!ELEMENT HR - O EMPTY -- horizontal rule -->
335 connolly 1.8 <!ELEMENT BR - O EMPTY -- @# BR -> &br; -->
336 connolly 1.6
337     <!ELEMENT ( %heading ) - - (%htext;)+>
338    
339 connolly 1.8 <!ELEMENT DL - - (DT*, DD?)+>
340     <!ATTLIST DL
341 connolly 1.11 COMPACT (COMPACT) #IMPLIED>
342 connolly 1.8
343     <!ELEMENT DT - O (%htext)+>
344     <!ELEMENT DD - O (%htext|%block)+>
345    
346     <!ELEMENT (%list) - - (LI)+>
347 connolly 1.2
348 connolly 1.8 <!ELEMENT LI - O (%htext|%block)+>
349 connolly 1.2
350 connolly 1.9 <!ELEMENT BLOCKQUOTE - - (%htext|%block)+ -- @# Hmm... --
351 connolly 1.6 -- for quoting some other source -->
352 connolly 1.3
353 connolly 1.11 <!ELEMENT ADDRESS - - (%htext;|%block)+>
354 connolly 1.2
355 connolly 1.8 <!ELEMENT PRE - - (#PCDATA|%pre-inline|A)+>
356 connolly 1.2 <!ATTLIST PRE
357 connolly 1.6 WIDTH NUMBER #implied
358 connolly 1.2 >
359    
360 connolly 1.6 <!-- Mnemonic character entities. -->
361 connolly 1.8
362     <!ENTITY % ISOlat1 PUBLIC
363     "ISO 8879:1986//ENTITIES Added Latin 1//EN">
364     %ISOlat1;
365    
366 connolly 1.11 <!ENTITY #DEFAULT SDATA "&#38;unkown;" --display the markup-->
367 connolly 1.12 <!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 connolly 1.8 <!ENTITY nbsp "<? nonbreaking-space>">
375     <!-- @# should add entites for processing instructions
376     for line break, centering, etc. -->
377 connolly 1.6
378 connolly 1.3
379 connolly 1.8 <!-- Forms -->
380     <![ %HTML.forms [
381    
382     <!ENTITY % HTTP-Method "(GET | POST)">
383 connolly 1.9 <!ELEMENT FORM - - (%body-content)* -(FORM) +(INPUT|SELECT|TEXTAREA)>
384 connolly 1.8 <!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 connolly 1.11 CHECKED (CHECKED) #IMPLIED
400 connolly 1.8 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 connolly 1.11 MULTIPLE (MULTIPLE) #IMPLIED
410 connolly 1.8 >
411    
412     <!ELEMENT OPTION - O (#PCDATA)>
413     <!ATTLIST OPTION
414 connolly 1.11 SELECTED (SELECTED) #IMPLIED
415 connolly 1.8 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 connolly 1.2
426 connolly 1.12 <!-- 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