[XOM-interest] Human-readable specification of the Nux XPath/XQuery result serialization algorithm?
William Vambenepe
william.vambenepe at oracle.com
Wed Oct 22 15:26:51 EDT 2008
The Nux ResultSequenceSerializer class supports two algorithms for
serializing an XPath/XQuery result sequence:
ResultSequenceSerializer.W3C_ALGORITHM and
ResultSequenceSerializer.WRAP_ALGORITHM.
The W3C algorithm has several shortcomings, as documented in the
ResultSequenceSerializer Javadoc
(http://acs.lbl.gov/nux/api/nux/xom/xquery/ResultSequenceSerializer.html).
Overall, the situation is not bright for flexible and interoperable XML
serialization of XPath/XQuery results
(http://stage.vambenepe.com/archives/197).
The "wrap algorithm" from Nux, on the other hand, appears very simple
and useful. Why the W3C didn't take a similar approach is something I'd
like to understand if anyone has any insight. But that's not the most
important at this point. What I am looking for is a serialization
algorithm I can point people to as part of specifying a protocol that
returns the result of an XPath evaluation.
I'd like to simply tell them "do what Nux does", but only Microsoft gets
away with that kind of implementation-centric specification language
(hello OOXML). Even though it's pretty easy to look at the Nux code (the
WrapSerializer nested class) and figure the algorithm. Or to run a few
XPath queries through it to see how each node type gets wrapped. Still,
I'd like to have a plain English description of the algorithm. But I
haven't been able to find such a thing. Does it exist?
(Apologies if the XOM mailing list is not the right place to ask this.
The Nux site gives the choice of this list and the Saxon mailing list
and it seemed to fit better here.)
William
More information about the XOM-interest
mailing list