Lists Home |
Date Index |
- From: "Rick Jelliffe" <firstname.lastname@example.org>
- To: <email@example.com>
- 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
> 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
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.
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:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)