[4suite] Merging PyXPath and 4Suite

Martin v. Loewis martin at mira.cs.tu-berlin.de
Thu Feb 1 15:53:20 MST 2001


The patch below is my first attempt of using PyXPath to replace the
XPath/XSLT-pattern parser in 4Suite. Those of you who have been
following the PyXPath development are aware of the principal
advantages that such integration can offer:

- PyXPath is pure Python, so it does not need any C extension modules.
- PyXPath is based on sre, so it can deal with expressions that contain
  non-ASCII Unicode characters.
- For those same reason (and because it creates a new parser object
  for each expression), PyXPath is thread-safe.

The integration in this patch is very lightweight, it just replaces
some of the relevant wrapper API, and adds a few new files (which are
from PyXPath 1.3 + bug fixes). During testing, I found one
incompatibility: the YAPPS parser uses a different syntax error class,
i.e. one that does not have the same attributes as the for-bison error
class; I also have use only for a single, not for two classes.

With this patch, the current Ft CVS still passes the 4XPath
test_suite. The 4XSLT test_suite seems to be broken; with minor
tweaks, I get the first three of basic_test.py to pass. The fourth one
fails for me even with stock Ft, so I'm not sure what the problem is.

Once this technology is considered acceptable, a number of clean-up
actions might be necessary: e.g. there is a lot of mapping between
Bison token numbers and XPath-API symbolic constants going on.

Please let me know what you think.

Regards,
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyxpath44suite.bz2
Type: application/octet-stream
Size: 13352 bytes
Desc: not available
Url : http://lists.fourthought.com/pipermail/4suite/attachments/20010201/4a28a9c0/pyxpath44suite.obj
-------------- next part --------------



More information about the 4suite mailing list