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. Is this now expected behaviour within a DOMSource transformation ? I've tried this in Xalan 2.7.0 unsuccessfully and also recreated the same problem this week in Xalan 2.7.1. Thanks Andy -- View this message in context: http://www.nabble.com/NPE-in-DOMSource-transformation-using-xsl%3Acopy-of-tf3187317.html#a8846364 Sent from the Xalan - J - Users mailing list archive at Nabble.com.