Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Human-readable specification of the Nux XPath/XQuery result serialization algorithm?

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: William Vambenepe <william.vambenepe AT>
  • To: xom-interest AT
  • Subject: [XOM-interest] Human-readable specification of the Nux XPath/XQuery result serialization algorithm?
  • Date: Wed, 22 Oct 2008 12:26:51 -0700

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 ( Overall, the situation is not bright for flexible and interoperable XML serialization of XPath/XQuery results (

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.)


Archive powered by MHonArc 2.6.24.

Top of Page