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,

Actions #1

Updated by Michael Kay over 9 years ago

  • Status changed from New to Resolved

A patch has been added which causes apply-imports and next-match to generate code that sets the current component in the context. Applied to 9.6 and 9.7; tested (for apply-imports only, but the code is the same) with the W3C build scripts.

Actions #2

Updated by O'Neil Delpratt over 9 years ago

  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.4

Bug fix applied in the Saxon 9.6.0.4 maintenance release.

Actions #3

Updated by O'Neil Delpratt over 9 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone set to 9.6.0.4
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.4 added
Actions #5

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone changed from 9.6.0.4 to 9.6.0.3
  • Fixed in Maintenance Release 9.6.0.3 added
  • Fixed in Maintenance Release deleted (9.6.0.4)
Actions #6

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone changed from 9.6.0.3 to 9.6.0.4
  • Fixed in Maintenance Release 9.6.0.4 added
  • Fixed in Maintenance Release deleted (9.6.0.3)

Please register to edit this issue

Also available in: Atom PDF