Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#313 NPE with empty xsl:[non-]matching-substring

v8.3
closed
Michael Kay
5
2012-10-08
2005-02-15
Michael Kay
No

If an xsl:analyze-string instruction in an XSLT
stylesheet has an xs:matching-substring or
xsl:non-matching-substring child element that is empty,
a NullPointerException occurs during stylesheet
compilation.

Circumvention: delete the empty element. Omitting
either of these elements has the same effect as
including an empty element.

Source fix: change line 195/196 of
net.sf.saxon.style.XSLAnalyzeString to read:

   (matchingBlock==null ? null :

matchingBlock.simplify(matching.getStaticContext())),
(nonMatchingBlock==null ? null :
nonMatchingBlock.simplify(nonMatching.getStaticContext())

Discussion