Project

Profile

Help

How to substitute Xalan with Saxon in Java?

Added by Anonymous almost 17 years ago

Legacy ID: #4711785 Legacy Poster: Stepan RYBAR (t603)

Hello! Is there any easy and reliable way, how to substitute Xalan by Saxon in Java distribution? Java distribution (e.g. JRE 1.6.0) comes with built-in Xalan. On the top of this Xalan are built custom applications calling JAXP's Xalan. But this Xalan does not support XSLT 2.0 and XPath 2.0. Is there any way how to throw away Xalan from Java and put there Saxon? It has to be done some way, which does not require any change inside custom applications built on the top of Java. Something like to use the standard “endorsed directories” mechanism to override the platform default version of JAXP if it is too old. Thank You, Stepan


Replies (1)

RE: How to substitute Xalan with Saxon in Jav - Added by Anonymous almost 17 years ago

Legacy ID: #4712449 Legacy Poster: Michael Kay (mhkay)

If the application invokes Xalan using standard JAXP interfaces, and if it doesn't do anything to request Xalan explicitly, and if it uses no Xalan extensions, then it should in principle be possible to switch to using Saxon by setting the system property java.xml.transform.TransformerFactory to the value net.sf.saxon.TransformerFactoryImpl. It might even be possible to do it by putting Saxon on the classpath - some people manage to do it by accident! However, those are big ifs. There are many reasons it might not work.

    (1-1/1)

    Please register to reply