<!--	html.dtd

        Document Type Definition for the HyperText Markup Language
        as used by the World Wide Web (HTML DTD).

	$Id: html.dtd,v 1.13 1994/05/18 17:23:29 connolly Exp $

	Author: Daniel W. Connolly <connolly@hal.com>
	See Also: http://www.hal.com/%7Econnolly/html-spec/HTML.html
		  http://info.cern.ch/hypertext/WWW/MarkUp/MarkUp.html
-->

<!ENTITY HTML.Version
	"-//connolly hal.com//DTD WWW HTML $Date 1994/04/19 17:24:06 $//EN"
	-- public identifier for "current pracitice" version             -- 
	-- actually, take the $'s out to get the real public identifer,  --
	-- since $ is illegal in public identifier. When DTD stabilizes, --
	-- we'll need to stop using RCS keywords to version the pub id   --

        -- Typical usage:

            <!DOCTYPE HTML PUBLIC "-//connolly hal.com//DTD WWW HTML
						$Date: 1994/05/18 17:23:29 $//EN">
	    <html>
	    ...
	    </html>
	--
	>


<!-- Feature Test Entities -->

<!-- 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.Minimal  "IGNORE">
<!ENTITY % HTML.Obsolete "IGNORE">
<!ENTITY % HTML.Prescriptive "IGNORE">

<![ %HTML.Minimal [
	<!ENTITY % HTML.linkRelationships "IGNORE">
	<!ENTITY % HTML.linkMethods "IGNORE">
	<!ENTITY % HTML.linkRedundantInfo "IGNORE">
	<!ENTITY % HTML.forms "IGNORE">
	<!-- @@ nested lists -->
	<!-- @@ phrases -->
	<!-- @@ 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.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.

	@@ Need to discuss relative addresses.
        -->

<!ENTITY % Content-Type "CDATA"
	-- meaning a MIME content type, as per RFC1521
	-->

<![ %HTML.anchorNameCDATA [ <!ENTITY % anchor-name "CDATA"> ]]>
<!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 % 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;)>

<!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
        >


<![ %HTML.pSeparator [ <!ENTITY % p-content "EMPTY"> ]]>
<!ENTITY % p-content "(%htext)+">
<!ELEMENT P     - O %p-content>
<!ELEMENT HR    - O EMPTY -- horizontal rule -->
<!ELEMENT BR    - O EMPTY -- @# BR -> &br; -->

<!ELEMENT ( %heading )  - -  (%htext;)+>

<!ELEMENT DL    - -  (DT*, DD?)+>
<!ATTLIST DL
	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//HTML">
%ISOlat1;

<!ENTITY #DEFAULT SDATA "&#38;unkown;" --display the markup-->
<!ENTITY amp CDATA "&#38;"     -- ampersand -->
<!ENTITY gt CDATA "&#62;"      -- greater than -->
<!ENTITY lt CDATA "&#60;"      -- less than -->
<!ENTITY quot CDATA "&#34;"    -- double quote -->

<!-- Processing Entities -->

<!ENTITY nbsp "<? nonbreaking-space>">
<!-- @# should add entites for processing instructions
	for line break, centering, etc. -->


<!-- Forms  -->
<![ %HTML.forms [

<!ENTITY % HTTP-Method "(GET | POST)">
<!ELEMENT FORM - - (%body-content)* -(FORM) +(INPUT|SELECT|TEXTAREA)>
<!ATTLIST FORM
	ACTION %URI #REQUIRED
	METHOD %HTTP-Method #IMPLIED -- @# MAILTO? --
	ENCTYPE %Content-Type; #IMPLIED
	>

<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX |
			RADIO | SUBMIT | RESET |
			IMAGE | HIDDEN )">
<!ELEMENT INPUT - O EMPTY>
<!ATTLIST INPUT
	TYPE %InputType #IMPLIED -- @# defaults to TEXT?? --
	NAME CDATA #IMPLIED -- required for all but submit and reset --
	VALUE CDATA #IMPLIED
	SRC %URI #IMPLIED -- for image inputs -- 
	CHECKED (CHECKED) #IMPLIED
	SIZE CDATA #IMPLIED -- @# should be NUMBERS: delimit with space, not comma --
	MAXLENGTH NUMBER #IMPLIED
	ALIGN (top|middle|bottom|left|center|right) #IMPLIED --@#supported?--
	>

<!ELEMENT SELECT - - (OPTION+)>
<!ATTLIST SELECT
	NAME CDATA #REQUIRED
	SIZE NUMBER #IMPLIED
	MULTIPLE (MULTIPLE) #IMPLIED
	>

<!ELEMENT OPTION - O (#PCDATA)>
<!ATTLIST OPTION
	SELECTED (SELECTED) #IMPLIED
	VALUE CDATA #IMPLIED
	>

<!ELEMENT TEXTAREA - - (#PCDATA)>
<!ATTLIST TEXTAREA
	NAME CDATA #REQUIRED
	ROWS NUMBER #REQUIRED -- @#implied? --
	COLS NUMBER #REQUIRED
	>
]]>

<!-- Obsolete Elements  -->

<![ %HTML.litCDATA [ <!ENTITY % lit-content "CDATA"> ]]>
<!ENTITY % lit-content "RCDATA">
<!ELEMENT (%literal) - -  %lit-content>

<![ %HTML.PLAINTEXT [
<!ELEMENT PLAINTEXT - O EMPTY>
]]>

