[Xpath-ng] My favorite XPath language]

Uche Ogbuji uche.ogbuji at fourthought.com
Fri Nov 22 09:19:10 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.

Looks like you're more making unwarranted assumptions than missing something  
:-)

Step processing in location paths happen to be the main area where sets are 
more natural in my experience (because of their natural union semantics) and 
where we temporarily move things to Python dicts for efficiency.

And overall, don't assume that your implementation experience and 
considerations would coincide with my own.  It's good that we seem to have a 
diversity of implementors about.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Tour of 4Suite - http://www.xml.com/pub/a/2002/10/16/py-xml.html
Proper XML Output in Python - http://www.xml.com/pub/a/2002/11/13/py-xml.html
RSS for Python - http://www-106.ibm.com/developerworks/webservices/library/ws-p
yth11.html
Debug XSLT on the fly - http://www-106.ibm.com/developerworks/xml/library/x-deb
ugxs.html





More information about the Xpath-ng mailing list