Problem with apply-templates in "#current" mode
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
#1 Updated by Michael Kay about 1 year 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.
Please register to edit this issue