Actions
Bug #2415
closedNullPointerException processing DOM with null nodeValue
Start date:
2015-07-09
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:
Description
Processing the following XML:
<testDetailSummary>
<testReference>Test</testReference>
<testSummary>
</testSummary>
<softwareBuild warning="no">BUILD</softwareBuild>
<startTime>Wed Jul 8 16:14:55 IST 2015</startTime>
<endTime>Wed Jul 8 16:16:51 IST 2015</endTime>
</testDetailSummary>
with the following XSLT:
<xsl:for-each select="owr/testDetailSummary/*">
<xsl:message>Processing test summary</xsl:message>
<li>
<b>
<xsl:choose>
<xsl:when test="local-name() = 'testReference'">
<xsl:message>Processing test ref</xsl:message>
<xsl:text>Test Reference: </xsl:text>
</xsl:when>
<xsl:when test="local-name() = 'testSummary'">
<xsl:message>Processing test summary</xsl:message>
<xsl:text>Test Summary: </xsl:text>
</xsl:when>
<xsl:when test="local-name() = 'startTime'">
<xsl:message>Processing start time</xsl:message>
<xsl:text>Test Start Time: </xsl:text>
</xsl:when>
<xsl:when test="local-name() = 'endTime'">
<xsl:message>Processing end time</xsl:message>
<xsl:text>Test End Time: </xsl:text>
</xsl:when>
<xsl:when test="local-name() = 'softwareBuild'">
<xsl:message>Processing software build</xsl:message>
<xsl:text>Software Build: </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="local-name()"/>
<xsl:message>Processing none of testDetailSummary</xsl:message>
<xsl:text>: </xsl:text>
</xsl:otherwise>
</xsl:choose>
</b>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
With the following output:
Processing test summary
Processing test ref
Processing test summary
Processing test summary
Produces the following exception:
2015-07-09 14:43:07.901 ERROR XMLToHTML applyStylesheet(...) - applyStylesheet: java.lang.RuntimeException: Internal error evaluating template at line 1 in module
java.lang.RuntimeException: Internal error evaluating template at line 1 in module
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:349)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.Controller.transformDocument(Controller.java:2106)
at net.sf.saxon.Controller.transform(Controller.java:1705)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:177)
Caused by: java.lang.NullPointerException
at net.sf.saxon.tree.util.FastStringBuffer.append(FastStringBuffer.java:68)
at net.sf.saxon.dom.DOMNodeWrapper.expandStringValue(DOMNodeWrapper.java:337)
at net.sf.saxon.dom.DOMNodeWrapper.getStringValueCS(DOMNodeWrapper.java:283)
at net.sf.saxon.tree.wrapper.AbstractNodeWrapper.atomize(AbstractNodeWrapper.java:104)
at net.sf.saxon.expr.Atomizer.evaluateItem(Atomizer.java:318)
at net.sf.saxon.expr.Atomizer.evaluateItem(Atomizer.java:35)
at net.sf.saxon.expr.AtomicSequenceConverter.evaluateItem(AtomicSequenceConverter.java:275)
at net.sf.saxon.expr.AtomicSequenceConverter.evaluateItem(AtomicSequenceConverter.java:30)
at net.sf.saxon.expr.Expression.evaluateAsString(Expression.java:524)
at net.sf.saxon.expr.instruct.SimpleNodeConstructor.processLeavingTail(SimpleNodeConstructor.java:216)
at net.sf.saxon.expr.instruct.ValueOf.processLeavingTail(ValueOf.java:280)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:419)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.expand(Template.java:367)
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:343)
at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:397)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
... 10 more
Please register to edit this issue
Actions