I wrote a Java application that uses JAXB for XSL transformations. I included saxon9.jar in my classpath to use XSLT 2.0 instead of XSLT 1.0 on the command line.
java -classpath ./lib/saxon9.jar:./ -jar myApp.jar
I have included the code in my XSL to report on the XSLT used.
<xsl:comment><xsl:text > </xsl:text>XSLT Version: <xsl:value-of select="system-property('xsl:version')" /> <xsl:text > </xsl:text>XSLT Vendor: <xsl:value-of select="system-property('xsl:vendor')" /> <xsl:text > </xsl:text>XSLT Vendor URL: <xsl:value-of select="system-property('xsl:vendor-url')" /> <xsl:text > </xsl:text></xsl:comment>
Reported.
XSLT Version: 1.0 XSLT Vendor: Apache Software Foundation (Xalan XSLTC) XSLT Vendor URL: http:
This is the default implementation, which is part of the JVM.
How can I use Saxon, which I indicated?
Following actions:
Thus, none of these methods worked (except for placing the Saxon jar in the approved catalog), but all of them should have worked. It seems the combination of my use of "-jar myApp.jar" and the desire for an alternative XSLT implementation were incompatible. In other words...
java -Djavax.xml.transform.TransformerFactory = net.sf.saxon.TransformerFactoryImpl -classpath./lib/saxon9.jar:./-jar myApp.jar
... does not work, but it does ...
java -Djavax.xml.transform.TransformerFactory = net.sf.saxon.TransformerFactoryImpl -classpath./lib/saxon9.jar:./myApp.jar org.dacracot.myApp
... interesting, I donβt even need to specify a factory, and I get the saxon version ...
java -classpath./lib/saxon9.jar:./myApp.jar org.dacracot.myApp
java classpath xml xslt jaxb
dacracot
source share