Kasimier Buchcik wrote:
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.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: <foo><b:bar/><foo/> 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"> <foo><b:bar/><foo/> <foo><b:bar/><foo/> <foo><b:bar/><foo/> </dest>
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.
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.
Rob
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
