XML Events - Advantages of XML Events

Advantages of XML Events

XML Events uses a separation of concerns design pattern, and is technology-neutral with regard to handlers. It gives authors freedom in organizing their code and allows separation of document content from scripting.

Legacy HTML and early SVG versions bind events to presentation elements by encoding the event name in an attribute name, such that the value of the attribute is the action for that event at that element. For example (with Javascript’s onclick attribute):

Stay here!

This design has three drawbacks:

  1. it hard-wires the events into the language, so that adding new event types requires changes to the language
  2. it forces authors to mix the content of the document with the specifications of the scripting and event handling, rather than allowing them to separate them.
  3. it restricts authors to a single scripting language per document.

Read more about this topic:  XML Events

Famous quotes containing the words advantages of, advantages and/or events:

    To become aware in time when young of the advantages of age; to maintain the advantages of youth in old age: both are pure fortune.
    Johann Wolfgang Von Goethe (1749–1832)

    The advantages found in history seem to be of three kinds, as it amuses the fancy, as it improves the understanding, and as it strengthens virtue.
    David Hume (1711–1776)

    When the course of events shall have removed you to distant scenes of action where laurels not nurtured with the blood of my country may be gathered, I shall urge sincere prayers for your obtaining every honor and preferment which may gladden the heart of a soldier.
    Thomas Jefferson (1743–1826)