Re: [xml] Feature request: callbacks



On Thu, Mar 15, 2001 at 01:48:00PM +0100, yves mail2 vlaanderen net wrote:
On Thu, Mar 15, 2001 at 07:27:44AM -0500, Daniel Veillard wrote:
  Honnestly I'm not found of it:
   - it's complex, and I don't see why this complexity is required.
     It's time to show up a really convincing example...
   - testing whether a callback and what callback should be called
     is complex, and that's an operation which is likely to happen
     in a number of speed critical places
   - even I have trouble understanding how it is supposed to work,
     I'm afraid of the consequences for application writers.
   - the per-document or per-node callback is not dependant on the
     node or de document to which this applies, so what's the use
     of such a switch (if if has to be node dependant, this mean
     adding one more pointer to the node structure and I say NO
     in advance) ? I think this swicth is better located in the
     application handler.

Isn't this feature part of DOM2 Mutation Events ? What's the reason why it
should be part of the node tree api ?

  Dohhh ... right
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents

  What freaks me is the following:
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces

"The EventTarget interface is implemented by all Nodes in an implementation
 which supports the DOM Event Model."

Which is clearly something I try to avoid (changing all node data structures
to add more stuff in them). I'm not sure I want to go there, I think the
DOM events were implemented on top of libxml (Raph Levien used them for
gill) without adding something specific.

The initial need for those callbacks cames from the use of _private, i.e. 
the application reserved pointer in the Node structure. Seems to me that
if there is really a need to stick to the DOM interface then this can (and is
) done with _private and in this case the DOM event registration can be
implemented at this layer with minimal penatly for all the other users of
libxml.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]