Living documents with XML events (1/4) - exploring XML | 2
Living documents with XML events
Naming Event Types
This specification does not specify how language designers should
name events (i.e., the values used in the event
attribute).
To identify event types from other namespaces, qualified names, as defined by XML schema, should be used, e.g.:
<listener event="smil:repeatEvent" observer="mm1" handler="synch1"/> <img src="button.gif" alt="ok" ev:event="ev:activate" handler="#act"/>
A number of event types are defined in the DOM level 2 specification, to which you should refer for their semantics.
Those events types, and the names you should use to refer to them are:
- User interface events:
- focusIn, focusOut, activate
- Mouse events:
- click, mousedown, mouseup, mouseover, mousemove, mouseout
- Key events:
- (none)
- Mutation events:
- subtreeModified, nodeInserted, nodeRemoved, nodeRemovedFromDocument, nodeInsertedIntoDocument, attrModified, characterDataModified
- HTML events:
- load, unload, abort, error, select, change, submit, reset, focus, blur, resize, scroll
All these event types are in the XML Events namespace.
Conclusion
Declaration and handling of events is of wide importance to many XML initiatives. Having it tackled at the generic level might prevent different reinventions in various XML vocabularies. It is quite surprising to see that this topic is addressed relatively late in the development of XML standards, hopefully not too late.
Produced by Michael Claßen
URL: https://www.webreference.com/xml/column43/4.html
Created: Nov 12, 2001
Revised: Nov 12, 2001