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


Help: OASIS Mailing Lists Help | MarkMail Help



   Why aren't document entities named?

[ Lists Home | Date Index | Thread Index ]
  • From: "Jeffrey E. Sussna" <jes@kuantech.com>
  • To: "'XML Dev'" <xml-dev@ic.ac.uk>
  • Date: Tue, 22 Jun 1999 16:24:52 -0700

The XML spec states "this specification does not specify how the document
entity is to be located by an XML processor; unlike other entities, the
document entity has no name and might well appear on a processor input
stream without any identification at all." I believe that failure to specify
a named identifier for document entities causes at least two problems:
1. There is no standard way to embed multiple WELL-FORMED documents within a
single physical document entity. Actually it's easy to embed them, but
difficult to extract them, since there's no standard way to detect "start of
document". I can think of two obvious ways to do it: a) hardwire the parsing
application to know about the root element; b) use a processing instruction,
such as <?start-doc?>. Neither of these are satisfactory because they step
out of the realm of a general standard.
2. Among other things, a document defines a scope for ID attributes. When a
document maps 1-to-1 to a file, it is easy to construct an URL that
identifies an element based on its ID. But if a file (or other storage unit)
contains multiple documents, how do you address ID'd elements (or even the
document itself). Again, the processing instruction could solve this problem
by providing a document name, a la <?start-doc name="doc1" ?>.
I'd really like to know why this one entity was made anonymous. I have long
felt that XML has certain weaknesses in the area of data structure
definition that other languages solve through comprehensive, logical rather
than physical, scoping facilities. I believe this is a prime case in point.
Jeff Sussna

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/ and on CD-ROM/ISBN 981-02-3594-1
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