OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



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

[ Lists Home | Date Index | Thread Index ]
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • To: <xml-dev@ic.ac.uk>
  • Date: Sat, 6 Jun 1998 01:57:12 +1000

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
> 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

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.phptr.com/  > Book Search > "Jelliffe"

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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS