[XML-SIG] using xslt with python

Paul Tremblay phthenry at earthlink.net
Sat Jun 14 04:14:32 EDT 2003


On Thu, Jun 12, 2003 at 07:40:26PM -0400, Daniel Veillard wrote:
> 
> On Thu, Jun 12, 2003 at 06:02:35PM -0400, Paul Tremblay wrote:
> > 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.
> 
>   You can make it work on Windows, and Unix by making sure your have
> libxml2 and libxslt python bindings installed too and using them without
> doing an exec. See http://xmlsoft.org/python.html and 
> http://xmlsoft.org/XSLT/python.html .

Could you pleae give me an example of how to pass params using the
bindings? I have tried in vain for an hour.

thanks

Paul

-- 

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



More information about the XML-SIG mailing list