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 and/or events:

    ... there are no chains so galling as the chains of ignorance—no 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 capability—no teachings but the teachings of the Holy Spirit.
    Maria Stewart (1803–1879)

    Whatever events in progress shall disgust men with cities, and infuse into them the passion for country life, and country pleasures, will render a service to the whole face of this continent, and will further the most poetic of all the occupations of real life, the bringing out by art the native but hidden graces of the landscape.
    Ralph Waldo Emerson (1803–1882)