XSLT processor command line

September 7th, 2008 mysurface Posted in Misc | Hits: 117991 | 2 Comments »

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.

2 Responses to “XSLT processor command line”

  1. Magnificent beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea

  2. Bawkbagawk, if that’s all you have to complain about, then I’m just SMH… oh, shaking my head. Can’t attack me since “m not a cop, so you try to attack my sentence structure too. Here, try this:

Leave a Reply