Details
-
Bug
-
Status: Resolved
-
Resolution: Fixed
-
2.3
-
None
-
None
-
Operating System: Other
Platform: Other
-
9731
Description
If an extension function exists which takes a Node parameter, and an xslt tag
specifies as a parameter a path to a node that does not exist, then a
NullPointerException is thrown before the extension function is invoked.
I would have expected null to be passed as the node instead.
Note that if the extension function takes a String instead, an empty string is
passed to the extension function in place of the invalid node.
eg
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3c.org/1999/XSL/Transform"
xmlns:ecn="xalan://nz.co.ecnetwork.xsltmap">
<xsl:template match="/">
<xsl:value-of select="ecn:Extensions.doIt(nosuchnode)"/>
</xsl:template>
package nz.co.ecnetwork.xsltmap;
public class Extensions
{
public static String doIt(Node node)
}
platform details:
- sun java 1.4.0 on linux
- xalan-j 2.3.1 (using java.endorsed.dirs to override rt.jar)
- default xml parser
-
-
-
- Any suggestions for workarounds for this problem welcome!!!!
-
-