Bug #3257
closedCrash in xsl:iterate - Internal error: no value for variable $word at line 27 of .....xsl
100%
Description
The variable in question is an xsl:iterate parameter.
The code is using Evaluator.SINGLE_ITEM which should only happen with a cardinality of exactly-one, but it seems the cardinality is zero-or-one.
Stylesheet attached; any source document will do.
Files
Updated by Michael Kay over 7 years ago
9.7 correctly fails saying "An empty sequence is not allowed as the second argument of map:get()".
Updated by Michael Kay over 7 years ago
The problem is that the expression map:get($histogram, $word) is being loop-lifted out of the xsl:iterate instruction for which $word is a local parameter. This is because the expression that binds $word (the LocalParam) is not an ancestor in the expression tree of the variable reference.
Fixing this in VariableReference.getScopingExpression()
Updated by Michael Kay over 7 years ago
- Subject changed from Internal error: no value for variable $word at line 27 of .....xsl to Crash in xsl:iterate - Internal error: no value for variable $word at line 27 of .....xsl
- Status changed from New to Resolved
- Priority changed from Low to Normal
- Fix Committed on Branch 9.8, trunk added
Updated by O'Neil Delpratt over 7 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.2 added
Patch applied in the Saxon 9.8.0.2 maintenance release
Please register to edit this issue