|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Serialization of XDMMichael Kay mike at saxonica.comMon Sep 14 22:16:22 PDT 2009
> On the other hand, it seems to me that we already have such a
> serialization format, and it's XQuery itself - or rather the
> subset that involves literals, sequence "constructor" (i.e.
> comma operator), and direct element/attribute/namespace/text
> constructors. It's as portable as it gets - any XQuery
> processor can immediately parse it.
> And it doesn't seem to be missing anything from XDM, either.
For some use cases it's important that the format be canonical: that is,
there should only be one way of representing a given sequence.
Also, XQuery doesn't have any direct way of representing the type annotation
on a node: the closest you can get is a validate{} instruction, and the
effect of this is very context-dependent.
Incidentally, one deficiency of the Saxon -wrap format that I mentioned
earlier is that it doesn't contain any information about node identity. If
you have a sequence of three elements with the same name and content, it
won't tell you whether the sequence being serialized contains three distinct
nodes, or a single node repeated three times.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
|
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
|






