[XML-SIG] Python extension module for Xerces/Xalan

Brian Quinlan brian@sweetapp.com
Sat, 14 Apr 2001 18:26:27 -0700


I've just made public my first run at a Python extension module providing
XSLT processing capabilities using Xerces/Xalan. The source and Windows
binaries for Python 2.0 and Python 2.1 are available. Unfortunately, there
is no Disutils setup file so you will have to manually place a few DLLs (or
change sys.path). Feedback would be much appreciated.

The URL is http://www.sweetapp.com/Pyana/

It is pretty early stage but I hope to add significant improvements soon.
Below is a sample usage:

>>> import Pyana
>>> params = { 'p1' : "'test'", 'p2' : 'count(//*)', 'p3' : '.' }
>>> sourceDoc = '<?xml version="1.0" ?><A>This is a test</A>'
>>> styleDoc =
Pyana.URI( 'http://www.sweetapp.com/Pyana/samples/params.xsl' )
>>> print Pyana.transform( sourceDoc, styleDoc, params )
<?xml version="1.0" encoding="UTF-8"?>
<params>
<p1>test</p1>
<p2>1</p2>
<p3>This is a test</p3>
<p4>p4 not provided</P4>
<p5>p5 not provided</p5>
</params>