Bug #1508
closedIssue with switching the global context item to the HTML document within an ixsl:event template
100%
Description
The context item within an ixsl:event template switches to the matching node which may either be the event target node or the first matching ancestor of the target node. Such a template works effectively as a new transform, so all global variables are re-evaluated, the context item for global variables in this case is the document node of the html page hosting the event node. Likewise, the root expression '/' will return the host document node.
This behaviour, where context is switched, is intentional and helpful when writing to the HTML page in response to a user event, it's also reasonably intuitive. There is an issue, however: if a source document parameter was set in the initial transform, no reference to this is available within an ixsl:event template (global variables are re-evaluated). The proposed solution for this is to provide an ixsl:source() function that will always return the document node of the source for the original transform, or return an empty sequence if this was not set.
Updated by O'Neil Delpratt over 11 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 1.0
Fixed in Saxon-CE version 1.0
Updated by O'Neil Delpratt over 11 years ago
- Sprint/Milestone set to Release 1.0
- % Done changed from 0 to 100
Please register to edit this issue