[XML-SIG] XPath in Python 2

Paul Prescod paul@prescod.net
Mon, 10 Jul 2000 16:17:36 -0500


Mike Olson wrote:
> 
> ...
>
> Or we could re write the parser in C/python.  There has been some talk
> of doing it with SRE....

I would personally benefit from having a full XPath engine in Python.
Let me play the devil's advocate and point out the potential problems.

 * building: can we add a FLEX/Bison dependency to the Python source?
 * maintenance: if the FourtThought guys retire to Tahiti after selling
out for a million to Red Hat, will someone else be willing to maintain
all of that code?

In general, Guido seems skittish about taking on large modules/packages.
I can't blame him because as BDFL he agrees to keep that code in sync
with the rest of Python forever. Expat is only sort of "halfway" in
there (in binary, not source distributions) and that took some arm
twisting.

Plus, ~150K is not a lot of disk space, but if you aren't using XPath at
all, you might resent it...

I wrote my 250 line tinyxpath to get around these problems. My
philosophy was that limited XPath support is better than none. In fact,
it was the same motivation for minidom! If I was being unnecessarily
conservative, then we should put in the full 4DOM and 4XPath.

Let me suggest a parallel approach. We can agree on an API so that
whether we put in a tiny version or a full version, the API doesn't
change. Meanwhile, we can try to groom 4XPath for inclusion (in 1.6 or
1.7) if the powers that be agree. My personal feeling is that the
Flex/Bison dependency is a show stopper. I wouldn't propose it for core
status while it is dependent (but I encourage anyone else to do it, if
they feel differently). 

-- 
 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