Pure Python XSLT library

前端 未结 5 1244
暖寄归人
暖寄归人 2021-02-07 03:14

Is there an XSLT library that is pure Python?

Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support.

I re

5条回答
  •  余生分开走
    2021-02-07 04:07

    I don't think you can do it in cpython: there are no pure python XSLT implementations.

    But you can trivially do it in jython, using the inbuilt XSLT APIs of the JVM. I wrote a blog post for the specific case of doing it on Google AppEngine, but the code given should work under jython in anyn circumstances.

    Transforming with XSLT on Google AppEngine and jython

    http://jython.xhaus.com/transforming-with-xslt-on-google-appengine-and-jython/

    HTH,

    Alan.

提交回复
热议问题