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:

    In 1845 he built himself a small framed house on the shores of Walden Pond, and lived there two years alone, a life of labor and study. This action was quite native and fit for him. No one who knew him would tax him with affectation. He was more unlike his neighbors in his thought than in his action. As soon as he had exhausted himself that advantages of his solitude, he abandoned it.
    Ralph Waldo Emerson (1803–1882)

    If we help an educated man’s daughter to go to Cambridge are we not forcing her to think not about education but about war?—not how she can learn, but how she can fight in order that she might win the same advantages as her brothers?
    Virginia Woolf (1882–1941)

    When the world was half a thousand years younger all events had much sharper outlines than now. The distance between sadness and joy, between good and bad fortune, seemed to be much greater than for us; every experience had that degree of directness and absoluteness which joy and sadness still have in the mind of a child
    Johan Huizinga (1872–1945)