Turns out that when converting from XSL in XML format to XSL in XSLTXT format XSLTXT produces different results for Java 1.4 and Java 1.5. In Java 1.4 the default SAX parser is org.apache.crimson.jaxp.SAXParserImpl while Java 1.5 uses com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl. Unfortunately they differ in the way they treat newlines at the start of text, the crimson parser incorrectly drops them. To get around this I've created a jar file for XSLTXT that includes the implementation classes for Xerces 2.6.2. If you're using Java 1.4, and you're converting from XSL in XML to XSL in XSLTXT format using the toXSLTXT command you should use this file. The xsltxt.jar and xsltxtWithXerces.jar file both check the class name of SAX parser that will be used and issue a warning if the name includes the string .crimson.. Get the latest version of XSLTXT from xsltxt.dev.java.net.
Posted by Alex at February 27, 2005 10:53 PM