33. XML Handlers Module

This section is normative for purposes of defining the integration of XML Handlers into XHTML 2. The semantics of XML Handlers itself is normatively defined in [XMLEVENTS].

The XML Handlers Module defines elements that are used to contain information pertaining to event handler implementations, usually defined in a scripting language. This section defines the content model of the XML Handlers module in XHTML 2. As permitted by [XMLEVENTS], these elements are incorporated into the XHTML namespace.

Elements and attributes included in this module are:

Element Attributes Content Model
action Common,
event* (QNames),
eventTarget (IDREFS),
declare ("declare"),
if (ConditionalExpression),
while (ConditionalExpression)
( action | dispatchEvent | addEventListener | removeEventListener | script | stopPropagation | preventDefault )+
dispatchEvent Common,
eventType* (QName),
targetid (IDREFS),
bubbles ("bubbles"),
cancelable ("cancelable")
EMPTY
addEventListener Common,
event* (QName),
handler* (IDREF),
phase ("bubble" | "capture" | "default"* | "target")
EMPTY
removeEventListener Common,
event* (QName),
handler* (IDREF),
phase ("bubble" | "capture" | "default"* | "target")
EMPTY
stopPropagation Common,
event* (QName)
EMPTY
preventDefault Common,
event* (QName)
EMPTY

Implementations: RelaxNG, XML Schema