Bug #3689
closedProblem with apply-templates in "#current" mode
100%
Description
For apply templates in current mode, the current component for the new context is not being set. This can result in internal errors.
Problem raised in forum issue: https://saxonica.plan.io/boards/5/topics/7147 - Error XError, message: "Internal error: Target component not found at htmlparse.xsl#423", code: "SXJS0004" when trying to use David Carlisle's XSLT 2.0 implementation of an HTML parser from Saxon-JS
Updated by Michael Kay almost 7 years ago
Note, I think the only case where you can do xsl:apply-templates mode="current" and the current component is not already the same as the current mode is where you are in a named template (current mode survives a call to a named template). If you're in a template rule then the current component is the same as the current mode; in all other cases, the current mode is absent.
Updated by Debbie Lockett almost 7 years ago
- Status changed from New to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
Add code in applyT implementation in Expr.js (line #75):
c2.currentComponent = context.currentMode
Committed on 1.0 and trunk branches.
Updated by Debbie Lockett over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.1.0
Bug fix applied in the Saxon-JS 1.1.0 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page