[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Why aren't document entities named?
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|