[lxml-dev] redundant namespace declarations

Stefan Behnel stefan_ml at behnel.de
Sat Feb 24 15:17:48 CET 2007


Hi,

Christian Zagrodnick wrote:
> On 2006-12-04 08:49:22 +0100, Stefan Behnel 
> <behnel_ml at gkec.informatik.tu-darmstadt.de> said:
>>> we use a function in libxml2 called xmlReconciliateNs() to fix the namespaces
>>> when merging trees. This function shows the above behaviour. To fix this, we'd
>>> have to implement our own version, which is a bit tricky and just wasn't
>>> important enough to try to get right so far. Note that even libxml2 had a
>>> (minor) bug up to version 2.6.26 here, so it's really not trivial to get this
>>> kind of thing right.
>> I finally took a(nother) shot at it and I now have an implementation that can
>> avoid this kind of problem. It's currently stored in the "nscleanup" branch,
>> but I will move it to the trunk ASAP. Please give it a try then, to see if it
>> works nicely for you in other cases where you encountered this.
> 
> That has not made it to the latest release, has it? Any plans to get it in?

It's still on the list. It didn't make it into 1.2, as I couldn't find the
time to make it work correctly. It still doesn't pass all of our test cases.

I know for myself how important this change is and I'll try to get it in soon.
The merge will just have to wait until it really works. This is a very
critical function that can break a horrible lot of things in an unexpected
way. Once it works, there will definitely be a beta version before it gets its
final blessing.

Stefan


More information about the lxml-dev mailing list