[Xpath-ng] My favorite XPath language]

David Rosenborg darolst at pantor.com
Fri Nov 22 09:20:53 MST 2002


> Pretty much so.  Node sets in 4XPath are Python lists.  In some cases we have 
> to use either Python dictionaries (hash tables) for efficiency, but because 
> document order is so much of the typical state of things in XPath, lists are 
> overall more efficient.  This, of course, leads to all sorts of contortions in 
> certain areas.
> 
> As an implementor, I'm all in favor of moving to lists in the spec.  I know 
> that some operations are more efficient if everything is designed as a set, 
> but I think such considerations are just not as prevalent in common processing.
> 
> So, even though David Carlisle was reluctant in his conclusion, I strongly 
> agree with it.  I think XPath NG should use lists, with nested lists 
> permitted.  I think we can work it so that the effects on backward 
> compatability are minimal.

I'm obviously missing something here. Could you give some examples of when
lists are preferable over sets inside location paths (if that's what you're saying)?
I've written about three XPath implementations, and node sets has always felt like
a natural choice.

Cheers,
David





More information about the Xpath-ng mailing list