Use saxon with python

Maliq picture Maliq · Apr 4, 2015 · Viewed 8.9k times · Source

I need to process XSLT using python, currently I'm using lxml which only support XSLT 1, now I need to process XSLT 2 is there any way to use saxon XSLT processor with python?

Answer

Michael Kay picture Michael Kay · Apr 4, 2015

There are two possible approaches:

  1. set up an HTTP service that accepts tranformation requests and implements them by invoking Saxon from Java; you can then send the transformation requests from Python over HTTP

  2. use the Saxon/C product, currently available on prerelease: details here: http://www.saxonica.com/saxon-c/index.xml