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)

    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)

    By many a legendary tale of violence and wrong, as well as by events which have passed before their eyes, these people have been taught to look upon white men with abhorrence.... I can sympathize with the spirit which prompts the Typee warrior to guard all the passes to his valley with the point of his levelled spear, and, standing upon the beach, with his back turned upon his green home, to hold at bay the intruding European.
    Herman Melville (1819–1891)