Taking into an account that we use Saxon for many years, it was strange to run into so simple error like the following:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="doc" as="element()+"><a/><b/><c/></xsl:variable> <xsl:sequence select="$doc = 3"/> </xsl:template> </xsl:stylesheet>
This is a simplified case that should produce an dynamic error FORG0001 as per General Comparisions; the real code is more complex, as it uses SFINAE and continues.
This case crushes in Saxon with exception:
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 net.sf.saxon.expr.GeneralComparison.compare() 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
We have reported the problem at Saxon's forum, and as usual the problem was shortly resolved.
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u