off-topic (was RE: Roots of the DTD)

Rick Jelliffe ricko at allette.com.au
Fri Jun 5 17:55:25 BST 1998


Just to fill in the gaps.

> From:   Simon St.Laurent

> I always thought it was kind of silly to declare it
> in DOCTYPE -
> after all, the root element should be the first and last thing
> you see in a
> document, and an application should be able to figure it out.  It
> seems to me
> like redundancy, though there may be reasons for it which I
> haven't fathomed.
>
> The other reason for ignoring roots is that we _can't_ change
> DOCTYPE, so I
> think we'd better just stay out of its way.

SGML and HTML allow tags to be missing. So you do not know what the top
element is, just by looking at the first tag. So this information needs to
be provided elsewhere: hence the element type name in the DOCTYPE
declaration.

SGML also allows <!DOCTYPE #IMPLIED SYSTEM> (I think this is default) which
means that if the first start-tag is the root element (the "document
element") and that if there is a DTD, the system knows about it
independently of having to name it.

XML does not allow tag ommission, or the #IMPLIED form.

Rick Jelliffe


==========================================================
The XML & SGML Cookbook, by Rick Jelliffe
Charles F. Goldfarb Series on Open Information Management
656 pages + CD-ROM, Prentice Hall 1998, ISBN 0-13-614223-0
http://www.sil.org/sgml/jelliffeXMLAnn.html
http://www.phptr.com/  > Book Search > "Jelliffe"
http://www.amazon.com/exec/obidos/ASIN/0136142230/002-4102466-3352420


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list