Running XSLT at the Department

Two recommended XSLT processors, Saxon by Michael Kay, and Apache Xalan are available in the department computing environment for the use of our course. They can be recommended in this order: I have found Saxon to be the more complete XSLT implementation. There is also a command-line XSLT processor called xsltproc available under Linux/Unix. It seems to be quite fast on some transformations, but since I have limited experience with using xsltproc, I cannot comment on the completeness and correctness of it. (Pekka Kilpeläinen, April 17, 2007)


(version 6.5.3)

Command line: java -jar saxon.jar [options] document.xml stylesheet.xslt [> result-file]


The Saxon JAR-file is found in O:\Jako\RDK\saxon.jar. You could write a command file, say, saxon.bat with the following content:

java -jar O:\Jako\RDK\saxon.jar %1 %2

This allows you to use a command line like saxon document.xml stylesheet.xsl [> result_file ]


The Saxon JAR-file is found in /wrk/RDK/saxon.jar. You can give the following definition on the command line or in your .bashrc or .bash_profile file:

saxon() { java -jar /wrk/RDK/saxon.jar "$@"; }

This allows you to simply use a command like saxon document.xml stylesheet.xsl [> result_file].


Command line: java org.apache.xalan.xslt.Process -in document.xml -xsl stylesheet.xsl [> result-file]

Apache Xalan is included in JDK version 1.4. (For other versions the Xalan JAR-file needs to be included on the classpath. It can be found under Linux/Unix in file /wrk/RDK/xalan.jar.)


Command line (Linux/Unix): xsltproc stylesheet.xsl source.xml [> result-file]

For more info, type man xsltproc.