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

Re: [xml] "Re: [xml] usage of xmlReconciliateNs"'



On Fri, Apr 25, 2003 at 04:17:54PM +0200, Kasimier Buchcik wrote:
> Hi,
> 
> Kasimier Buchcik wrote:
> 
> > xmlReconciliateNS calls xmlNewReconciliedNs(doc, tree, node->ns) to 
> > search for existing namespaces; "tree" is the given top of the subtree 
> > and never changes, thus the search won't ever touch any of the declared 
> > namespaces *inside* the subtree.
> > 
> > Kasimier Buchcik
> 
> I'm repeating this statement, since it is a statement and not a question 
> and I don't know if someone feels in mood to let roll a statement in his 
> head...
> 
> So add to it:
> Is this a bug, if the namespaces declared inside the subtree are not 
> included to the search for reusable namespaces?

  In general this won't work because the namespace node needs to be "in-scope"
i.e. held by a parent of the node referencing it, and usually if you're missing
a namespace it's because the parent was from the old tree.

   <a>
      <b xmlns:foo="foo">
         <c foo:attr="">
	    <d xmlns:bar="foo">
	       <foo:e/>
	    </d>
	 </c>
      </b>
   </a>

  though possible is unlikely. If you detach <c> the namespace used by e
could be remapped to the one held by d, but it won't fix the problem for 
foo:attr on c anyway...
  So no I think it makes little sense to do what you suggest.

Daniel
-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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