tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ron riley <>
Subject XSL Transformations under 4.1 and jdk1.4.1 always validating?
Date Mon, 14 Apr 2003 16:07:28 GMT

I'm having trouble performing xsl transformations in Tomcat 4.1 running in 
sun's jdk1.4.1.  

We have a class, called XMLTransformer that is used by servlets to parse 
templates which includes the following in its constructor:

  //instantiate a transformer factory
    tFactory =  javax.xml.transform.TransformerFactory.newInstance();
    templates = tFactory.newTemplates(strNameOfXslFile);

If I invoke this class outside of tomcat like this:  

$JAVA_HOME/bin/java  -Djava.endorsed.dirs=/opt/tomcats/LIVE/common/endorsed  
-classpath XMLTransformer_path XMLTransformer an_xsl_file

then an instance of the class in instantiated and everything is fine.  
However, the same class invoked on the same xsl_file produces the following 
error when run in tomcat:

[Fatal Error] fees.xsl:1:50: White spaces are required between publicId and 
ERROR:  'White spaces are required between publicId and systemId.'
SAXException (1)
javax.xml.transform.TransformerConfigurationException: Could not compile 
        at XMLTransformer.<init>(

I believe the environment is the same in both cases:

The latest releases of xalan.jar, xercesImpl.jar, xml-apis.jar,  
xmlParserAPIs.jar and xsltc.jar have been put into 

The line -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed is in the command 
line that starts the container. includes 

The error message suggests that a parser is trying to validate the xsl file? 
The xsl file contains no dtd and I don't want it to be validated.  I can't 
find any way to switch validation on/off in the 
org.apache.xalan.TransformerFactory api - but somehow it is being switched on 
by tomcat?

If anyone can explain what is happening or knows what to do about this I'd 
really like to hear from them!

Many thanks


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message