Re: [xml] Potential wrong usage of xmlIsID() in tree.c

On Thu, Feb 23, 2006 at 04:05:21PM +0100, Kasimier Buchcik wrote:
Daniel, could we have that flag field on xmlDoc?

  Explain clearly the semantic of it. A priori I'm not too fond of it
if we start having different data structure based on what is using the
library we just make debugging on bug reports near impossible.


Such a flag would enable/disable the attribute creation/addition
functions to perform an automatic ID-detection based on a DTD.

I have thought about what we already have for using DOM on top
of Libxml2.

We could integrate the needed ID semantics for DOM
into: xmlDOMWrapRemoveNode(), xmlDOMWrapAdoptNode() and
What we are missing in this set of DOM functions is a
xmlDOMWrapAddNode() function, which would implement the desired ID
handling - based on the given options.

This way we wouldn't need any additional settings on the xmlDoc - just
inside the wrapper itself. A tiny beautiful island, full of DOM.

  If you really need to add a new function to the API then okay,
it's still way better than different behaviour based on a flag somewhere.


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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