Hi,
I couldn't get this to fail when running from the command line:
java -Djava.endorsed.dirs=d:\xalan-j_2_7_0 org.apache.xalan.xslt.Process -xsl test.xsl -in test.xml
Does it fail for you when running from the command line as well or only when running within Tomcat? Are you using the Tomcat endorsed directory (<Tomcat_Home>\common\endorsed )?
Did you get a stack trace with the exception?
Thanks.
Erin Harris
footh <[EMAIL PROTECTED]>
25/10/2006 05:47 PM |
|
I am using an identity template that removes
namespaces in a Cocoon application that runs under
Tomcat. Previously, I was using Java 1.4.2 but once I
switched to Java 1.5 I receive a null pointer
TransformerException. Following is the identity
template that matches all nodes. The error occurs on
the "apply-templates" tag. On the "select" attribute,
the presence of the "@*" symbol causes the error. If
I remove it, everything is fine. However, then
attributes of nodes are not rendered. Has anyone
encountered this problem before? Any suggestions?
<xsl:template match="*">
<xsl:element name="{name()}"
namespace="{namespace-uri()}">
<xsl:apply-templates select="@*|node()" />
</xsl:element>
</xsl:template>
I've tried throwing in different versions of Xalan
jars to no avail. Currently, I'm using 2.7.0.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com