Re: [xml] Feature request: callbacks



On Thu, Mar 15, 2001 at 01:43:51PM +0000, Matt Sergeant wrote:
On Thu, 15 Mar 2001, Daniel Veillard wrote:

  - Callback signature:
    a few week ago I would have used
    void (*xmlTreeChangeCallback) (xmlNodePtr node);
    but it's clear that Perl binding would require something like
    void (*xmlTreeChangeCallback) (void *user_data, xmlNodePtr node);
    is that sufficient ? I assume user_data would be registered at
    the same time as the set of callbacks.

if node can get at the xmlDocPtr (owner document?), then user_data
shouldn't be necessary, should it?

  If there is no hole in the API, any node should have its 'doc'
field pointing to the document. Problem is that at some points
(for example if you just created the node without assigning it
to a document) this is not true anyway.

(unless there's no private data storage
in the docPtr).

  There is, all public nodes should have it.
But my guts feeling is that user_data should be available anyway.

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]