On Thu, Feb 23, 2006 at 05:44:26PM -0500, Rob Richards wrote:
> Daniel Veillard wrote:
> 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.

  okay

> Daniel, from a non-DOM perspective, what's your view on adding auto 
> ID-ness detection to functions like addchild, addsibling, etc... In the 

  I'm undecided. On one side the fact of adding an attribute to a document
may potentially make the parent an ID for that document. On the other side
you have the XML Infoset spec which state that IDness is a property of the
attribute (set at parse time or creation time)
  http://www.w3.org/TR/xml-infoset/#infoitem.attribute
  [attribute type] == ID
and well when you copy this attribute you copy its infoset and hence its
properties.

> patch I'm working on I removed my original code for those and only fixed 
> up some other issues, but do you want the ID stuff added there as well 
> for consistency with the newprop, setprop functions or should detection 
> just be left in the state it is in now? If you do think it should go in, 
> the last question I have is creating a xml:id attribute without a parent 
> element. Right now it marks it as an ID, but I think xmlNewPropInternal 
> should be changed to check for a parent element first.

  To me creating a new attribute should definitely make the lookup and
set the attribute type, but if you copy an existing one I think the existing
type should be maintained, it may differ if you reserialize and reparse
but that's a different document.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to