Handling user input events
Event handlers for user input are written in the form of template rules. The match pattern of
the template rule must match the element that receives the event, and the mode name reflects the
type of event, for example
ixsl:onclick. This causes a new transformation to take
place, using the existing stylesheet, which is initiated with the target element in the HTML DOM
as the initial context item.
Of course, CSS can be used in the usual way to control changes in appearance in response to
using XSLT. Saxon-CE sets the event listener on the
document object. On receiving an
event notification, the processor checks for matching template rules on the target element and
then on ancestors of the target element (provision is also made for events on linked SVG
While an event is being processed, the function
ixsl:event() can be called to
Event object; its properties and methods are available via the
ixsl:call() extension functions.