2010/2/28 Stefan Behnel <stefan...@behnel.de> > 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 > > yes, that's true, and probably the best way to use XML stylesheets in Linux.
However, this is a Python ML, and so I was sending the Python example. The original poster does not necessarily use Linux, and I do not know about Windos tools in that regard. BR, Roland > Stefan > > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list