XSLT processor command line
September 7th, 2008 mysurface Posted in Misc | Hits: 20533 |
XSLT stand for XSL transformation, and XSL is EXtensible Stylesheet Language, it is XML-based Stylesheet Language defined by W3C. XSLT is one of the famous XML technology, XML that uses XSL needs transformation before that make sense. Some application such as firefox browser do support XSLT, with xsl source specified, it will be transform automatically.
If you have XSL, and xml that uses XSL, you can also transform by using a command call xsltproc. xsltproc is a tool from libxslt. The usage is straight forward:
xsltproc mytemp.xsl mytarget.xml
The line above will dump the transformed xml to standard output, which you can redirect it to any files.
With -o, the transformed xml will be dumped into file.
xsltproc mytemp.xsl mytarget.xml -o myresult.xml
p.s. For xsltproc, the targeted xml do not need to specified the xsl inline such as:
<?xml-stylesheet href="mytemp.xsl" type="text/xsl" ?>
To know more about XSLT check out W3C XSLT tutorial, or check out ways of transform XML with XSLT. You can also get some samples from the W3C tutorial to try out xsltproc.
Live Chat!









Leave a Reply