[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Why aren't document entities named?

  • From: "Jeffrey E. Sussna" <jes@k...>
  • To: "'XML Dev'" <xml-dev@i...>
  • Date: Tue, 22 Jun 1999 16:24:52 -0700

t document
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@i...
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@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.