[XML-SIG] XSLT 2 and XQuery in (C)Python?

Stefan Behnel stefan_ml at behnel.de
Thu Jan 3 12:42:22 CET 2008


I don't know of any Python integrated implementations, but...

Höke, Christof wrote:
> I used Saxon's XSLT 2 with Jython which is great and suspect Saxon.NET runs
> with IronPython (have not tried that though). Is there maybe a way to
> access Saxon from CPython?

you can call Saxon (which also supports XQuery) through its command line
interface (subprocess module). At least the binary distribution of Saxon also
compiles nicely with gcj, in case you do not want a JVM around when you run
it. This worked for me:

gcj -o saxon $CFLAGS --main=net.sf.saxon.Transform saxon9.jar

Obviously, if you want a better interface (such as stdin/stdout
transformation), you can write it in Java and compile it together with the jar.

A C-level interface to a gcj compiled Saxon would be cool (as they did with
Lucene). That way, you could get a pretty low-level (SAX2?) interface into lxml...


More information about the XML-SIG mailing list