On Tue, Feb 21, 2006 at 12:53:32PM +1300, Andrew Miller wrote:
> Quoting Daniel Veillard <[EMAIL PROTECTED]>:
> > I don't understand the patch especially the node->doc != doc test, please
> elaborate, thanks !
> 
> The first check tests for cases where it doesn't make sense to search for the
> namespace, and sets the ns to NULL in those cases. If the prefix is NULL, it 
> is
> clearly not sensible to search for a match by prefix(remember namespace is
> defined if we get to that code). The document equality check is there because
> prefixes from one document don't make sense in another document.

   Hum, that copy operation try to preserve the prefix as far as I remember,
you are not changing that, aren't you ?

> I added the root->parent->type == XML_ELEMENT_NODE check into the while loop
> because xmlNewNs seems to want an element, and otherwise we traverse past the
> document element and get the document.

   Okay that makes sense.

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