XT is an implementation in Java of XSLT, created by James Clark.
XT XSLT an implementation in Java of XSLT, created by James Clark.
To use XT, you need:
- the XT distribution
- an XML parser in Java that supports SAX, such
as XP; you should choose a SAX parser that provides Locator information, otherwise you won't get any line numbers in error messages
Put xt.jar
in your CLASSPATH, together with whatever is needed for your XML parser, and sax.jar if that isn't included with your XML parser. Then use the command:
java -Dcom.jclark.xsl.sax.parser=your-sax-driver com.jclark.xsl.sax.Driver source stylesheet result name=value...
The name=value arguments are optional and specify parameter names and values; they can occur in any order with respect to the other arguments. They will be ignored unless the stylesheet contains a corresponding top-level xsl:param element. The value of the parameter will be of type string.
To find a SAX parser, XT first uses the value of the system property com.jclark.xsl.sax.parser; if this is not set it uses the value of the system property org.xml.sax.parser; if this is not set it uses the class com.jclark.xml.sax.CommentDriver (This subclasses the normal XP SAX driver to provide support for comments; it is present only in XP version 0.5 or later; if you have an earlier version of XP use -Dcom.jclark.xsl.sax.parser=com.jclark.xml.sax.Driver instead.)
Alternatively under Windows you can use XT packaged as a Win32 executable. This includes XP and SAX. To use this, you will need to have the Microsoft Java VM installed (this is included with IE). Run this with the command:
xt source stylesheet result name=value...
Useful references: