[XML-SIG] using xslt with python

Paul Tremblay phthenry at earthlink.net
Thu Jun 12 19:02:35 EDT 2003


Can someone give me some instructins on how to process and xslt
stylesheet with python?

I have written a script that translates plain text to docbook. Much of
the script depends on xslt transformations.

Right now I use a bit of a hack:

command = 'xsltproc --param indent-amount %s %s %s > %s' % \
                (indent_amount, xsl_file, file, output)
        os.system(command)

This only works on unix, and it only works if the user has xsltproc. I
want to make the script useable for different platforms, and ideally for
different xslt processors. For example, if the user wants to use xalan,
then the script uses xalan to process the document.

thanks

Paul

-- 

************************
*Paul Tremblay         *
*phthenry at earthlink.net*
************************



More information about the XML-SIG mailing list