[jdom-interest] XPath.selectNodes(doc) via Jaxen: nodes not in document-order

Elliotte Rusty Harold elharo at metalab.unc.edu
Mon Aug 16 03:26:04 PDT 2004


At 11:36 AM +0200 8/16/04, Kai Wörner wrote:
>Hi List,
>
>as far as I've understood the documentation, a xpath.selectNodes() should
>return a list including the xpath results in document order. Given the
>following XML:
>

That's not always true. Reverse axes such as 
ancestor and ancestor-or-self should return their 
node lists in reverse document order. However the 
descendant-or-self axis you're using is a forward 
axis, so that does look like a bug. It's probably 
in Jaxen, not JDOM, though; so that's where it 
would need to be fixed.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the jdom-interest mailing list