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.)
“Men hear gladly of the power of blood or race. Every body likes to know that his advantages cannot be attributed to air, soil, sea, or to local wealth, as mines and quarries, nor to laws and traditions, nor to fortune, but to superior brain, as it makes the praise more personal to him.”
—Ralph Waldo Emerson (18031882)
“On the most profitable lie, the course of events presently lays a destructive tax; whilst frankness invites frankness, puts the parties on a convenient footing, and makes their business a friendship.”
—Ralph Waldo Emerson (18031882)