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:
“... there are no chains so galling as the chains of ignoranceno fetters so binding as those that bind the soul, and exclude it from the vast field of useful and scientific knowledge. O, had I received the advantages of early education, my ideas would, ere now, have expanded far and wide; but, alas! I possess nothing but moral capabilityno teachings but the teachings of the Holy Spirit.”
—Maria Stewart (18031879)
“... 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 (17921873)
“One cannot be a good historian of the outward, visible world without giving some thought to the hidden, private life of ordinary people; and on the other hand one cannot be a good historian of this inner life without taking into account outward events where these are relevant. They are two orders of fact which reflect each other, which are always linked and which sometimes provoke each other.”
—Victor Hugo (18021885)