This problem was fixed in Java 5 and 6. The bundled parser and XSLT engine are fallbacks if no JAXP property has been set. And a JAXP property is set if you use properly configured jar files, such as the ones Xerces, Xalan and Saxon offer for download. The bundled Xerces and Xalan are also in a different package, to avoid any clashes with a separately installed version.
Simon On Wed, Dec 31, 2008 at 04:26:02PM +0100, Andreas Delmelle wrote: > On 31 Dec 2008, at 13:44, Simon Pepping wrote: > > Hi Simon, Phil, > >> This can be achieved by manipulating your classpath. If you ensure >> that saxon's jar file is before xalan in the classpath, the correct >> definition as quoted below is ensured automatically. This is achieved >> because the jar file has this setting in its META-INF/services >> directory. > > Correct, but ... this is only true in case the Java runtime does not > come bootstrapped with its own XSLT processor. Sun and IBM both bundle > Xalan, which becomes the preferred implementation unless you either > override it using the JAXP system property. GNU Classpath is an example > of a Java runtime that does not bundle its own XSLT processor. > > Another option to force Saxon to be the chosen XSLT implementation at > runtime, is to specify the 'bootclasspath' system property, and make > sure Saxon's JAR ends up before the 'native' Xalan version. > > Same for the parser. Fiddling with the normal classpath alone is not > sufficient to ensure that another version than the bundled one is used > at runtime. > > To sum it up, the options are: > 1° set the related system properties via the command-line > 2° set them in a jaxp.properties file (should be located in $JRE_HOME$/ > lib) > 3° force the bootclasspath via the command-line, so that the desired > implementations appear before their 'native' counterparts > 4° override the implementations by dropping the related JARs in > $JRE_HOME$/lib/endorsed > > Both option 1° and 3° affect only one particular run of one application. > Option 2° and 4° will affect all Java-XML applications running on the > system. -- Simon Pepping home page: http://www.leverkruid.eu