How to execute XSLT 2.0 with ant?

The problem is that while Saxon is added to the classpath, the default JAXP mechanism to determine which TransformerFactory is used and it will use the default that is Xalan. You either need to:

  • Set javax.xml.transform.TransformerFactory system variable to net.sf.saxon.TransformerFactoryImpl,
  • Add saxon9.jar to the CLASSPATH system variable, or
  • Use <factory name="net.sf.saxon.TransformerFactoryImpl"/> inside the xslt element

Leave a Comment