Yeah, I was going to say the same thing. I think it would be worth updating the FAQ to indicate that this is not really a problem in Java 5 or later and would also like to add something about the 14compatibility.jar in OS X specifically.

It's also worth mentioning that Xalan bundled with the Sun's Java only includes the Compiling processor and not the Intepretting processor from what I can tell.

- Bradley

On Nov 21, 2008, at 12:56 PM, Michael Ludwig wrote:

[EMAIL PROTECTED] schrieb:
Sanity check, since I haven't been paying enough attention to this
thread:
You're aware of the distinction between the normal classpath and the
"endorsed standards"/system classpath, right?

See http://xml.apache.org/xalan-j/faq.html, entry "I'm having a
problem running Xalan-Java on JDK/JRE 1.4 or higher".

This says:

 JDK/JRE 1.4, and JDK/JRE 5.0 is packaged with an old version of
 Xalan-Java. The JDK/JRE will attempt to use this version instead of
 any on the classpath. Unfortunately, this causes problems when
 attempting to use a newer version of Xalan-Java.

Don't know about 1.4, but this is not quite true for the following on
Windows/32:

 * jre1.5.0_06
 * jre1.6.0_07
 * jdk1.6.0_07

They do have a version of Xalan, but it has been relocated to another
package starting with "com.sun".

* TransformerFactory.newInstance() ->
 com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl

* transformerFactory.newTransformer() ->
 com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl

Putting Xalan-2.7.1.jar on the CLASSPATH overrides the defaults for
TransformerFactory and Transformer, because of:

 $XalanJAR/META-INF/services/javax.xml.transform.TransformerFactory

Which contains "org.apache.xalan.processor.TransformerFactoryImpl".

So with 1.5 on Windows (and apparently also on Linux), the problem has
gone. The Apache-Xalan can be chosen simply by putting the JAR on the
CLASSPATH.

Michael Ludwig

Reply via email to