[XML-SIG] XPath in Python 2

Paul Prescod paul@prescod.net
Tue, 11 Jul 2000 12:20:33 -0500


Mike Olson wrote:
> 
> ... Imagine
> 
> /EMPLOYEES/EMPLOYEE[@position="Manager"]/SPOUSE[size(CHILDREN) >
> 3]/CHILDREN[@age > 18]
> 
> Without predicates, you would get back a list of children, then you need
> to see which of those has a parent whose married to a manager, then
> remove all children who are from families with less then 3 siblings, and
> then all children with an age less then 18.
> 
> Somewhat of a contrived example, but hopefully you see my point

Yes, but it is basically an issue of cost/benefit. Sometimes it would be
cool to have the full power of SQL in Python also, but Gadfly isn't part
of the main distribution. I still maintain that the first 10% of XPath
gives you a greater than proportional benefit. If we can't figure out
how to get the full 100% in, then I think we should go with 10%.

-- 
 Paul Prescod - Not encumbered by corporate consensus
"Computer Associates is expected to come in with better than expected 
earnings." Bob O'Brien, quoted in
	- http://www.fool.com/news/2000/foth000316.htm