Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.7
-
None
-
Windows XP, running Sun Java 1.5 and IBM Java 1.5
Description
We're currently working on moving from Xalan 2.3.1 to Xalan 2.7.0 and have
encountered a problem with xsl:copy-of. Using StreamSource transformations,
the code behaves as expected. However when using a DOMSource transformation
(which we mostly do) a NullPointerException is thrown. The transformation
is exited at the point reached without any exception being thrown.
Unfortunately the resulting XML is missing nodes that had not been reached
in the transformation.
The XSL stylesheet is very similar to many others that we have, with the
template causing the problem being :-
<xsl:template match="/WorkingDocument/Notes/Request" mode="build">
<Request>
<xsl:copy-of select = "Message"/>
<xsl:copy-of select = "Action"/>
<xsl:copy-of select = "NPQuote"/>
......
Some manipulation of data in the Request node
.......
</Request>
</xsl:template>
The node /WorkingDocument/Notes/Request/NPQuote does not exist. Xalan
outputs a warning message "SystemId Unknown; Line #37; Column #37;
java.lang.NullPointerException" but does not throw an Exception. No node
after the completion of the previous line appears in the resulting XML.
I've tried this in Xalan 2.7.0 unsuccessfully and also recreated the same
problem this week in Xalan 2.7.1.