Project

Profile

Help

Bug #3257

closed

Crash in xsl:iterate - Internal error: no value for variable $word at line 27 of .....xsl

Added by Michael Kay almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2017-06-10
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

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

random-spec.xsl (1.61 KB) random-spec.xsl Michael Kay, 2017-06-11 00:46
Actions #1

Updated by Michael Kay almost 7 years ago

9.7 correctly fails saying "An empty sequence is not allowed as the second argument of map:get()".

Actions #2

Updated by Michael Kay almost 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()

Actions #3

Updated by Michael Kay almost 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
Actions #4

Updated by Michael Kay almost 7 years ago

Added XSLT30 test case si-iterate-037

Actions #5

Updated by O'Neil Delpratt almost 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

Also available in: Atom PDF