
Hi, Stefan Behnel wrote:
Noah Slater wrote:
On 29/05/06, Noah Slater <nslater@gmail.com> wrote:
I noticed today that certain child attribute values are mangled when you try to insert/append child elements onto parent elements.
I have written a test script for this as usual. I have just noticed that if you set the attributes after you have added to the tree the weird bug does not happen.
Thanks for reporting this. It looks like a bug in libxml2, as it only happens for "xml:id", not for other attributes. I guess the bug is in xmlReconciliateNs, but that's really just guessing.
Well, it was /related/ to xmlReconciliateNs, but not a bug in libxml2 and only by chance it showed fro xml:id. lxml was running xmlReconciliateNs /after/ cleaning up the document references in the Python elements. Which means it freed the document if all references were gone, but before trying to access its namespaces. Great. That bug was in there for ages, since SVN revision 12568! Fixed in the trunk. Stefan