Re: [xml] redicting parts of trees

Kasimier Buchcik wrote:

On the other side, if the missing declaration xmlns:b="urn:test:foo" was
stored internally _somewhere_ instead, we would get:

 - adopt some nodes with:
     @node == <foo><b:bar/><foo/>, with b bound to "urn:test:foo"

 - for every @node we will get:
     and a xmlns:b="urn:test:foo" stored internally on the document

 - if added to the destination tree it could look like this.
   <dest xmlns:b="urn:test:foo">

   With bar->ns still referencing the stored xmlNs struct.

 - if added to the tree a xmlReconciliateNs would attach bar->ns to
   dest->nsDef, avoiding redundant declarations.

So quite some less declarations.
Ok, things became crystal after looking at your scenario. Think I got my head up my ass today as it took me forever to realize what you were saying. That should work fine. As I mentioned before worst case a call to xmlReconciliateNs after calling the adopt function could fix up the data if for some reason it didnt integrate well with other functionality.


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