On 5/19/08 10:53 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>> That is not true. The definition of document in the XML 1.1 spec is: >> ( prolog element Misc* ) > > Hmmm. You're right; my error. That's true even in 1.0. > > > Tim Bray, in his Annotated XML Specification, said: > > "The fact that you're allowed some trailing junk after the root element, I > decided (but unfortunately too late) is a real design error in XML. If I'm > writing a network client, I'm probably going to close the link as soon as > a I see the root element end-tag, and not depend on the other end closing > it down properly. > "Furthermore, if I want to send a succession of XML documents over a > network link, if I find a processing instruction after a root element, is > it a trailer on the previous document, or part of the prolog of the next?" I would think that you'd pretty much have to assume that any PI following a root element is part of the element's document since you would expect an XML declaration to precede any PIs associated with any following document. That reflects the fact that an XML declaration in a stream of concatenated strings to be interpreted as XML documents is an unambiguous signal of document boundaries. If you want to transmit XML documents as sequences of characters and enable multiple docs in a single literal string, you need to define a convention for signaling their boundaries, which means either requiring the using of XML declarations or define some other signal as part of your protocol. It's not the XML standard's place to define network protocols. And if you forget that the atomic unit of data in XML is the *document* and not the *element* then you will come to grief, as Tim suggests above. Cheers, Eliot -- Eliot Kimber Senior Solutions Architect "Bringing Strategy, Content, and Technology Together" Main: 610.631.6770 www.reallysi.com www.rsuitecms.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]