[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: [xquery-talk] Serialization of XDM
- From: "David A. Lee" <dlee@calldei.com>
- To: lists@fgeorges.org
- Date: Mon, 14 Sep 2009 10:48:31 -0400
![Re: [xquery-talk] Serialization of XDM](/images/get_stylus.gif)
I agree with your sentiment
"if not you can serialize and parse them without loosing any
information."
but not the implication.
This is (partially) true, but the problem with this is there is not
*standardized* way to do this.
For simple things like say sequences of nodes, you can wrap them in a
document.
Or for say integers you can wrap them in something like an
<integer> tag.
The problem is there are a *million* ways to do it ... which means no
vendor has agreed, which leaves it up to the programmer to do it.
Which means you have to cooperate on both sides of the equation, and
since there is no standardized way to do it, different toolkits or
pieces are almost certain to do it differently, and possibly in ways
that are difficult to parse.
By "partially" I am refering to the interesting XDM type of
attributes, which noone can agree at all on how to serialize.
( although you could stick them in an element ... )
So to make this actually work in practice, you must control both sides
of the partnership, and the serialization in between, and also pass
"metadata" either by convention or something to make it all work.  A
programmer, to say take the output of one XQuery, store it in a file,
then put it back into an external varialbe of another XQuery invocation
has to do quite a lot of work, the sort of work that XML was designed
explicitly to *avoid having to do*.
Even defining a standardized schema for 'wrapping' XDM content
unambiguously in a XML document would be a huge value,
even if the result wasn't pretty, at least it has the potential for
interchange.
But lets not talk about function items ... I have no clue where to go
with those ....
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org
812-482-5224
Florent Georges wrote:
David A. Lee wrote:
Hi,
There is no standard or even 'community accepted' way of
serializing XDM
While I used to think this is a problem, more and more I think
it is not (or at most a little problem we can live with.) XDM
is a convenient (and needed) data structure to work with within a
piece of code (like a stylesheet or a query.) (BTW this is a
pity that XProc is not based on XDM, IMHO)
But if you want to pass information between two different
pieces of code (like between a query and a stylesheet) you can
just restrict yourself to nodes. If you want to pass a sequence
of integers, you can instead pass an element containing elements
the content of which are integers...
So the simple rule: independent pieces of code set boundaries
between which you can only pass nodes, or even document nodes.
That's what XML means, after all. If you use compatible
processors, you should then be able to configure them to pass
those nodes in an efficient way, and if not you can serialize and
parse them without loosing any information.
Just my two cents....
Regards,
|

[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
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
RSS 2.0 |
 |
Atom 0.3 |
 |
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|