Jump to content

XML Events

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dmccreary (talk | contribs) at 14:46, 28 July 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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

  • [1] W3C Web Site for XML Events