Project

Profile

Help

Bug #1508

closed

Issue with switching the global context item to the HTML document within an ixsl:event template

Added by Philip Fearon almost 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
2012-05-02
Due date:
% Done:

100%

Estimated time:
Platforms:

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.

Actions #1

Updated by Philip Fearon almost 12 years ago

  • Status changed from New to Resolved

Fixed

Actions #2

Updated by O'Neil Delpratt about 11 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.0

Fixed in Saxon-CE version 1.0

Actions #3

Updated by O'Neil Delpratt about 11 years ago

  • Sprint/Milestone set to Release 1.0
  • % Done changed from 0 to 100

Please register to edit this issue

Also available in: Atom PDF