The Cougar Document Type Definition

This is a snapshot of the Cougar DTD. This is work in progress, subject to change at any time. It does not imply endorsement by, or the consensus of, either W3C or members of the HTML working group. Enclosed are six components which you can extract for use with tools such as James Clark's nsgmlsu which is available as part of the SP package from http://www.jclark.com/sp/index.htm You will need the Unicode version as Cougar uses Unicode for the document character set.

Cougar.cat
An SGML Open catalog file that binds public and system identifiers to local file names.
Cougar.decl
The SGML Declaration defining the document character set etc.
Cougar.dtd
Document Type Definition that defines the syntax of HTML documents.
ISOlat1.ent
Defines the Latin-1 named character entities imported by the DTD.
HTMLmisc.ent
Defines the miscellaneous named character entities imported by the DTD.
HTMLsym.ent
Defines the named character entities for symbols imported by the DTD. This set is derived from the Adobe Symbol font.

Using nsgmlsu to validate HTML documents

First create your HTML file which must start with the <!DOCTYPE> declaration, e.g.

  <!DOCTYPE HTML SYSTEM
    "http://www.w3.org/pub/WWW/MarkUp/Cougar/Cougar.dtd">
  <title>A title</title>
  <Para style="color: red">Hi Mom!

With the test file in the same directory as the six files named above, you can then validate your file as follows:

  nsgmlsu -s -m Cougar.cat Cougar.decl test.html

   test.html:3:13:E: there is no attribute `STYLE'
   test.html:3:25:E: element `PARA' not allowed here
   test.html:3:25:E: element `PARA' undefined
   test.html:3:34:E: `HTML' not finished but document ended

This shows the output when you've absent mindedly typed "para" in place of "p" for a paragraph start tag. The "-s" option shows only the error messages, suppressing normal ouput. Correcting the above error then produces no output. Note that it is unnecessary to include the HTML, HEAD or BODY elements as these can be safely omitted. The <!DOCTYPE> and TITLE on the otherhand are essential.