You could always tag the root node with a special attribute, say
xml:serialized="true", and then treat the document as needing special
de-serialization treatment. That way you don't need a wrapper element
for a single node. It would however be difficult to distinguish an
element node from a document: not sure if that matters? Also: if you
really need round-trip serialization, aren't people going to want to
attach type information as well? That seems like a trap to me: if you
get into that, this'll never get specified or implemented in any
reasonable way.
-Mike
David A. Lee wrote:
4AAF80C3.4010805@calldei.com" type="cite">
The one problem I am struggling with for an XML serialization format
for XDM is the use case which I suspect is the most common use case,
outputting a single XML Document.
If it was serialized in this new "XML XDM" format then the output of a
single XML document wouldnt be the XML document, it would by necessity
be wrapped in something like
<XDM>
<xml/>
</XDM>
and you'd have to unwrap it in oder to use it.
This means that when doing XML processes you need to know ahead of time
whether your going to do XML or XDM serialization and then handle the
data accordingly.
This is why I had suggested as an ideal, that the degenerate case of
XDM serialization of a single XML document be in fact the XML text
serialization format.
That way for the most common use case the output would be the same as
conventionally.
But maybe this goal doesn't matter as much as having a XDM format that
works equally well in all cases.
I suspect it would be difficult, both technically and politically to
get acceptance of any other format *besides* an XML wrapped format.
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org
812-482-5224
Mukul Gandhi wrote:
7870f82e0909150445s51bb6260w3aa2902bc9800f63@mail.gmail.com"
type="cite">
I thought about your proposal once again. I think, this would be
useful for XML community.
so, +1 from me for this proposal. As I wrote earlier, I think a XML
format (defined as a XML Schema), would be good for XDM serialization.
On Tue, Sep 15, 2009 at 12:55 AM, David A. Lee <dlee@calldei.com> wrote:
There is one other use case submitted to me privately:
Paraphrased:
5) given a huge xml instance, in an XML database or flat file.
Basically too big to manage with XSLT.
Use xquery to extract manageable chunks, then pass on to XSLT to process
as required.
Reconstitute the results back to an XML document.
David A. Lee
dlee@calldei.com http://www.calldei.com
http://www.xmlsh.org
812-482-5224
|