Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: XPath

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: John Cowan <jcowan AT reutershealth.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Wed, 12 Jan 2005 06:03:17 -0500

John Cowan wrote:

The difficulty is that the value of an XPath expression of type nodeset
is a set of nodes (lower case referring to the XPath data model), whereas
your proposed API returns a set (or rather a sequence, but that's no
problem) of Nodes (title case referring to objects of class Node).
There is no way to reliably map a sequence of Nodes into a sequence of
nodes without examining the tree itself.


Good point, though it's actually the unorderedness of the set that's tricky here. I'll have to look at the API and implementation but I think I can guarantee that at an absolute minimum the XOM Text objects making up an XPath text node do not get reshuffled. That is, they will be returned in the same order they appeared in in the input document.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page