Hi,

On Thu, 2006-02-23 at 09:15 -0500, Daniel Veillard wrote:
> On Thu, Feb 23, 2006 at 03:05:46PM +0100, Kasimier Buchcik wrote:
> > [ ... cut an invalid example ... ]
> > 
> > According to Daniel, the IDness based on DTDs can really be queried by a
> > element/attribute combination, without caring if at overall valid
> > position.
> > 
> > So maybe we could advance by looking at the second option: making the
> > DTD based detection optional.
> 
>   DTD loading itself is optional, ID detection can't be garanteed.
> However IDness is really the result of checking (element name/attribute name)
> in the DTD (or internal subset) when inserted in the document.
> 
> > > Thanks for the clarification. After your follow up message I thought you 
> > > meant that detection in general was broken.
> > > 
> > > I just saw your latest message and I was about to propose something 
> > > exactly along those lines. This way if it defaulted to enabled then 
> > > libxml2 could operate as intended. In the case using the lib to 
> > > implement DOM, it could be disabled and ID detection work as we have 
> > > kind of layed out in these messages. Is it possible to extend the 
> > > document node to include flags? This way it might also serve any future 
> > > need to provide some instructions or indications on the state of the 
> > > document?
> > 
> > Sounds great.
> > 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.
> 
> Daniel

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.

Proposal:
We could integrate the needed ID semantics for DOM
into: xmlDOMWrapRemoveNode(), xmlDOMWrapAdoptNode() and
xmlDOMWrapCloneNode().
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.

Regards,

Kasimier


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to