[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Streams, protocols, documents and fragments was: RE: Documents and D
Jonathan Borden: > I think this whole discussion is getting muddled because terminology of >different domains is being interchanged. Perhaps. I am quite happy for people to use the term "document" or "logical document" or "physical document" in a general sense. It is the term "XML document" I am trying to be careful about. I'm not talking about streaming, or any particular application, just trying to be clear on what is and what isn't an "XML document". My contention is merely that: >> I don't believe you have an "XML document" until you serialise as well-formed >> XML text. Consider: class Element { String gi; String content; Element(String gi, String content) { this.gi = gi; this.content = content; } String toXML() { return "<"+this.gi+">"+this.content+"</"+this.gi+">"; } Now if I say Element document = new Element("greetings","Hello!"); Then 'document' is *not* an XML document. It is a Java object. If I say Element el = new Element("greetings","Hello!"); String document = el.toXML(); Then 'document' *is* (potentially) an XML document (and also a Java object). To put it crudely, it's gotta have the angled brackets to be XML. That's my point. It's one I am quite willing to be corrected on, if someone can show that the XML 1.0 REC allows for an XML document that doesn't begin with the text "<" optionally preceded by whitespace. [greetings {Hello!}] is a valid representation of the logical structure of an XML document. It isn't an XML document. ><term>document</term> is defined as in the XML spec. documents are well >formed. when a document fragment is isolated from its parent document, it >becomes a standalone document. In this thread I have tended to qualify "document", i.e. "XML document" to (try to) avoid confusion with any discussion of documents in general. You don't define document fragment anywhere. :-) [...] >So, the problem here is not one with XML, rather the protocol used to >transmit documents, HTTP and SMTP send one MIME message per PDU, >streaming protocols can be defined which transmit multiple documents. I agree. This is not what I am arguing about. James 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
|