Martin v. Loewis has announced
PyXPath 1.2, a drop-in replacement parser for the bison/lex part of 4XPath.
In the process of writing PyXPath, Loewis created an abstract API to XPath. He writes:
Unlike a former W3C effort, this API is currently designed
towards "pluggable parsers", i.e. the implementation of the abstract
syntax tree is separated from the parser engine.
This interface currently does not at all attempt to support
evaluation; thus it is orthogonal to Scott Boag's draft, which only
supported evaluation but not creation of an XPath tree. I plan to
extend that API to also support evaluation; contributions are welcome.
The API can be found at the bottom of Loewis' mail to the Python XML-SIG mailing list.
PyXPath 1.2 can be downloaded from his Loewis' site.