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


On Thu, 2006-02-23 at 17:44 -0500, Rob Richards wrote:
Daniel Veillard wrote:
On Thu, Feb 23, 2006 at 09:49:04PM +0100, cazic gmx net wrote:
Thinking this over again, plus taking into account what you said about
reusing the code in tree.c, I now think that the DOM-wrapper functions
should better stay in tree.c. An other Idea: what about extending the
arguments of the "internal" functions like you did for xmlCopyPropInternal()
(dunno exactly its name, don't have the code at hand) to take additional
options we need for DOM processing? This way, the normal tree functions
would work their default way and we could add semantics for DOM. So,
together with a narrow entry point like the
xmlDOMWrapDoWhateverIWantWithTheContext(xmlDOMWrapMagicCtxtPtr ctxt)
function, we could all have what we want: a flexible and reusable internal
code base, and two flavours of APIs with different semantics on top; no
special flags on docs; no additional big DOM API inside Libxml2.

  Fine by me too, more in line with the existing code. The possibility
to still be able to configure DOM specific entry point out would be
a plus (i.e. --with-tree but --without-dom).

This works for me as well. I think we are on the same wavelength here as 
this was my third option when I had mentioned a lot of refactoring. I 
don't like the single entry point either (confusing to use). As long as 
we re-use existing code where possible I don't have a problem with the 
additional functions.


OK. Now that I have disgusted you with the narrow entry point: can we
already foresee which additional xmlDOMWrapXXX functions we need?
I think it would be good for Daniel to see what additional functions
we talk about.

For me the following functions come currently into consideration:
1) an add-child-node function
2) a create-attribute-node function
3) an add-attribute-node-to-elem function
4) a set-attribute-on-elem function
Maybe 3) and 4) could be combined into one function.



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