[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] text nodes of document in XDM
- From: "David Lee" <dlee@calldei.com>
- To: "'Michael Sokolov'" <sokolov@ifactory.com>, "'David Carlisle'" <davidc@nag.co.uk>
- Date: Wed, 12 Jan 2011 08:33:17 -0500
>> Micheal Sokolv
Have you considered implementing serialization of sequences of XdmItems
rather than documents? That way you could preserve the distinctions
that are being lost when you go to a document. If somebody wants to
make a document from your serialized format, they could always construct
it easily enough.
-==================
Absolutely ! (you can see a *draft* of this at
http://xml.calldei.com/XDMSerialize )
But the problem is one of the items can be a document.
And once the document is serialized, if I use standard document
serialization http://www.w3.org/TR/xslt-xquery-serialization/
for the document node. I don't know how to get the document *back* into
the original XDM form.
In the case of documents which have more than just a single child element as
their children I don't know of any XML parsers which can undo what was done
during the serialization
and give me back the XDM representation of the document node item.
Maybe (probably) I am missing something obvious. But it is this "oddity"
of what is allowed within document nodes which is a current tough spot for
coming up with an
XDM *item* level serialization format which is implementable without having
to write your own XML parser for the XML bits.
My original (naive) idea was that when hitting document nodes in an XDM item
sequence, to serialize as XML and then use an XML parser to get it back.
Then I ran into issue above which I have not yet come up with a clean
solution.
----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]