[XML-SIG] The Zen of DOM

Robin Becker robin@jessikat.demon.co.uk
Thu, 6 Apr 2000 18:11:08 +0100


In article <200004061610.KAA04403@localhost.localdomain>, Uche Ogbuji
<uogbuji@fourthought.com> writes
>> Completely off topic, why is the term 'event' used to denote
>> 'recognition' in this XML parser world? It doesn't seem to ring the
>> right bells to my jaded ear. I guess what I used to call 'semantic
>> actions' are now known as 'event handlers'.
>
>It depends on your point of view.  The reason "events" are used in the context 
>of SAX semantics is because SAX uses asynchronous events (in the classical 
>sense) to signal semantic units.  To SAX's view, the parser is 
>highly-decoupled from the handler, and so it looks as if it is just firing an 
>event and going on about its business.  Now you as the programmer, the 
>omniscient observer, sees that most practical SAX applications do actually 
>have a high degree of coupling between the parser and event-handler, and so to 
>you it's nothing more than a simple procedure call.  But remember that SAX is 
>modeled such that this needn't be the case.
>
>

I assume that the events are ordered even though they may be
asynchronous; how are errors reported in this model ie as soon as
possible or are the error events also randomly delayed? 
-- 
Robin Becker