XML Events
In XMLstandards, XML Events are a World-Wide Web specification for events that are typically performed by a user on a device such as a web page, cell phone or telephone.
Formal Definition
Technically an XML event is the representation of some asynchronous occurrence (such as a mouse click on a button) that gets associated with any data element in an XML document.
Motivation
The XML Events standard is defined to provides XML languages with the ability to uniformly integrate event listeners and associated event handlers with Document Object Model (DOM) Level 2 event interfaces. The result is to provide an interoperable way of associating behaviors with document-level markup such as XHTML.
Relationship to Other Standards
Unlike DOM Events which are usually associated with HTML documents, XML events are designed to be independent of devices.
XML Events are also used extensively in the new XForms standard.
Example of XML Event using XForms Listner
The following is an example of how XML events are used in the XForms specification:
<listener event="click" observer="myButton" handler="#doit"/>
In this example, when the click event occurs on the data element with it myButton, the handler doit (for example a javascript) is called.
See also
External Links
- [1] W3C Web Site for XML Events