Project

Profile

Help

Bug #4448

closed

Local variables in xsl:key definition: Internal error: Cannot set local variable: no slot allocated

Added by Johan Gheys about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
Start date:
2020-01-29
Due date:
% Done:

100%

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

Description

When transforming a primary input file with Saxon-EE-9.9.1.6 thereby looking up information in a secondary input file with the key() function, we have the following error:

Exception in thread "main" java.lang.AssertionError: Internal error: Cannot set local variable: no slot allocated at net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:348) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:507) at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:518) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:62) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:213) at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:446) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:530) at net.sf.saxon.trans.KeyIndex.processNode(KeyIndex.java:198) at net.sf.saxon.trans.KeyIndex.lambda$constructIndex$0(KeyIndex.java:164) at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128) at net.sf.saxon.trans.KeyIndex.constructIndex(KeyIndex.java:164) at net.sf.saxon.trans.KeyIndex.buildIndex(KeyIndex.java:127) at net.sf.saxon.trans.KeyManager.buildIndex(KeyManager.java:263) at net.sf.saxon.trans.KeyManager.obtainLocalIndex(KeyManager.java:471) at net.sf.saxon.trans.KeyManager.obtainIndex(KeyManager.java:369) at net.sf.saxon.trans.KeyManager.selectByKey(KeyManager.java:314) at net.sf.saxon.functions.KeyFn.search(KeyFn.java:267) at net.sf.saxon.functions.KeyFn.call(KeyFn.java:192) at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:532) at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:922) at net.sf.saxon.expr.instruct.BlockIterator.next(BlockIterator.java:49) at net.sf.saxon.expr.FirstItemExpression.evaluateItem(FirstItemExpression.java:113) at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:213) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:532) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:714) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:533) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:251) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352) at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:431) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:533) at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:71) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:495) at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:746) at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347) at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:311) at net.sf.saxon.Transform.processFile(Transform.java:1283) at net.sf.saxon.Transform.doTransform(Transform.java:815) at net.sf.saxon.Transform.main(Transform.java:80)

See a simplified example in attachment. No problem with Saxon-EE-9.9.1.5.


Files

no-slot-allocated.zip (4.62 KB) no-slot-allocated.zip Johan Gheys, 2020-01-29 15:26

Please register to edit this issue

Also available in: Atom PDF