Internal error evaluating template (Saxon-HE 9.6.0-6)

Added by Vladimir Nesterovsky about 4 years ago


I've run into a simple example that throws an error. Please consider:

/xsl:template /xsl:stylesheet

This produces:

Exception in thread "main" java.lang.RuntimeException: Internal error evaluating template at line 3 in module ICE9.6.xslt at net.sf.saxon.expr.instruct.Template.applyLeavingTail( at net.sf.saxon.trans.Mode.applyTemplates( at net.sf.saxon.Controller.transformDocument( at net.sf.saxon.Controller.transform( at net.sf.saxon.s9api.XsltTransformer.transform( at net.sf.saxon.jaxp.TransformerImpl.transform( ... Caused by: java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString( at java.lang.Long.parseLong( at java.lang.Long.parseLong( at net.sf.saxon.expr.GeneralComparison.quickCompare( at at net.sf.saxon.expr.GeneralComparison.evaluateManyToOne( at net.sf.saxon.expr.GeneralComparison.evaluateItem( at net.sf.saxon.expr.GeneralComparison.evaluateItem( at net.sf.saxon.expr.Expression.process( at net.sf.saxon.expr.instruct.Template.applyLeavingTail( ... 8 more

Replies (2)

RE: Internal error evaluating template (Saxon-HE 9.6.0-6) - Added by Michael Kay about 4 years ago

Thanks for reporting it. I've reproduced the problem and made it into W3C test case math-0106. Saxon has a fast path for comparing strings to numbers without fully parsing the number, and this is failing when the string is zero-length. The correct outcome, I think, is dynamic error FORG0001.


    Please register to reply