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:

    Can you conceive what it is to native-born American women citizens, accustomed to the advantages of our schools, our churches and the mingling of our social life, to ask over and over again for so simple a thing as that “we, the people,” should mean women as well as men; that our Constitution should mean exactly what it says?
    Mary F. Eastman, U.S. suffragist. As quoted in History of Woman Suffrage, vol. 4 ch. 5, by Susan B. Anthony and Ida Husted Harper (1902)

    ... is it not clear that to give to such women as desire it and can devote themselves to literary and scientific pursuits all the advantages enjoyed by men of the same class will lessen essentially the number of thoughtless, idle, vain and frivolous women and thus secure the [sic] society the services of those who now hang as dead weight?
    Sarah M. Grimke (1792–1873)

    One of the extraordinary things about human events is that the unthinkable becomes thinkable.
    Salman Rushdie (b. 1948)