[Python-Dev] Request for Opinions

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Fri, 14 Jul 2000 10:13:46 +0300 (IDT)


On Thu, 13 Jul 2000, Paul Prescod wrote:

> There is a language called "XPath" for navigating XML trees. It makes
> your life a lot easier. XPath is to XML trees as SQL is to relational
> databases. Imagine working with relational databases by looping over
> records with no query language! I think that some portion of XPath
> should go into Python 2.

I agree -- XPath would be cool to work with.

> 4Thought has a large, sophisticated implementation of the entire XPath
> language. They use Bison (not PyBison!) and FLEX for parsing
> performance.

The output of Bison is covered by the GPL, and flex requires a runtime
library. We want a rich Python, but there's no reason for a billionaire
<wink>

>  1. use the relatively large 4XPath as is

This seems to have a significant cost for the Python distribution

>  2. use a tiny subset of XPath (analogous SQL with only simple SELECT)
> that can be implemented in a couple of hundred lines of Python code
> (this code is mostly done already, in a module called TinyXPath)

+0 on that.

>  3. try to scale 4XPath back by moving its parser to SRE, and making
> some of its features "options" that can be added separately (not clear
> how easy this is)

If you think someone will do this, this is great. If not, there isn't
much point in discussing it, is there? <0.9 wink>

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez