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:
- it hard-wires the events into the language, so that adding new event types requires changes to the language
- 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.
- 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:
“The respect for human rights is one of the most significant advantages of a free and democratic nation in the peaceful struggle for influence, and we should use this good weapon as effectively as possible.”
—Jimmy Carter (James Earl Carter, Jr.)
“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)
“Man is a stream whose source is hidden. Our being is descending into us from we know not whence. The most exact calculator has no prescience that somewhat incalculable may not balk the very next moment. I am constrained every moment to acknowledge a higher origin for events than the will I call mine.”
—Ralph Waldo Emerson (18031882)