Project

Profile

Help

Bug #2261

closed

With bytecode on, apply-imports fails to set current component

Added by Michael Kay over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Byte code generation
Sprint/Milestone:
Start date:
2014-12-15
Due date:
% Done:

100%

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

Description

With bytecode generation enabled in Saxon-EE, the xsl:apply-imports instruction fails to make the invoked template the current component in the context, which means that calls to other global components (templates, functions, global variables) from the invoked template may fail to bind correctly. The symptom will often be something like

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:547)

at java.util.ArrayList.get(ArrayList.java:322)

at net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:778)

at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:331)

In the particular instance, the failing stylesheet is the W3C stylesheet used for building the XDM specification,

Please register to edit this issue

Also available in: Atom PDF