Roland Mueller, 28.02.2010 13:01: > The stylesheet is test.xsl and the insput data test.xml. The following > Python code the applies the stylesheet on the input data and puts the output > into foo. > > Python code: > #!/usr/bin/python > import sys > import libxml2 > import libxslt > > styledoc = libxml2.parseFile("test.xsl") > style = libxslt.parseStylesheetDoc(styledoc) > doc = libxml2.parseFile("test.xml") > result = style.applyStylesheet(doc, None) > style.saveResultToFilename("foo", result, 0) > > BR, > Roland > > *Example run in Linux:* > rol...@komputer:~/Desktop/XML/XSLT$ ./xslt_test.py
Note that the shorthand for the above is $ xsltproc test.xsl test.xml > foo Stefan -- http://mail.python.org/mailman/listinfo/python-list