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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Nested Documents (was: XML 2.0)

In a world where XML allows multiple roots, I’m curious whether each root would potentially allow a different encoding?  Would multiple prologs be allowed?  Would multiple be necessary?


We recently had basically the situation described below.  However, we were on the receiving end of a “batch” of multiple XML “documents” stored in a single file.  Each document was separated by prolog.  To fit this into our pipeline, we wrote a customer XMLFilter (SAX) which understood that the file was really multiple XML files and then generated events...the first of which was a dummy root.  It worked quite well but was an extra step nonetheless.


Matt Johnson



From: COUTHURES Alain [mailto:alain.couthures@agencexml.com]
Sent: Wednesday, February 27, 2008 9:55 AM
To: Richard Salz
Cc: Michael Kay; xml-dev@lists.xml.org
Subject: Re: [xml-dev] Nested Documents (was: XML 2.0)


I don't understand what you mean by "more tightly linked"...

Having multiple roots is almost as having multiple documents, one after another, in a single message or in a single file... ?!?

I have seen plenty of examples of XML documents which are nothing but a collection of sub-documents and, in these cases, the root is meaningless, just there to have a valid XML document. When you convert a CSV file to an XML document, you have to create a root element, let's say 'Records', without attributes, and as many 'Record' elements as lines in the CSV file. I think 'Records' is useless...


Richard Salz a écrit :

You didn't respond to what I thought was the more interesting point: multiple roots result in producer, intermediary, and consumer being more tightly linked.  Yes, as someone pointed out, you have the issue of trailing comments and PI's, but I'll do a hand-wave and say those are not common.  And I admit I'm trying to brush off something I find inconvenient. :)


STSM, DataPower Chief Programmer
WebSphere DataPower SOA Appliances


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS