XSLT to Python script conversion?
Tim Arnold
Tim.Arnold at sas.com
Wed Feb 15 12:48:13 EST 2012
On 2/13/2012 6:20 AM, Matej Cepl wrote:
> Hi,
>
> I am getting more and more discouraged from using XSLT for a
> transformation from one XML scheme to another one. Does anybody could
> share any experience with porting moderately complicated XSLT stylesheet
> (https://gitorious.org/sword/czekms-csp_bible/blobs/master/CEP2OSIS.xsl)
> into a Python script using ElementTree's interparse or perhaps xml.sax?
>
> Any tools for this? Speed differences (currently I am using xsltproc)?
> Any thoughts?
>
> Thank you,
>
> Matěj
Just a note to encourage you to stick with XSLT. I also use lxml for
creating and postprocessing my DocBook documents and it is great. But I
use the DocBook XSL stylesheets to convert to html; if you're like me,
you got discouraged at the strangeness of the XSLT language.
I'm no expert with it by any means, but I'm amazed at some of the things
it does. It is a great tool to add to your programming toolbox.
Also, I used xsltproc for a while but bogged down in processing time.
Now I use SAXON which is much faster for my documents.
Good luck,
--Tim
More information about the Python-list
mailing list