The GNOME CVS -> Subversion conversion did not happen and I happily checked in your patch with one small tweak in xmtree.c to handle the situation when namespace node found by xmlSearchNsByHref() lookup has a prefix re-defined later:
<A xmlns:a="http://www.example.org/a"> <B xmlns:a="http://www.example.org/b"> <C> </C> </B> </A> If we do a lookup for namespace "http://www.example.org/a" from node <C> then we would find definition for xmlns:a="http://www.example.org/a" in node <A>. However, we can not use prefix "a" in the node <C> because it was already re-defined in node <B>. The code in the patch did the following: nsPtr = xmlSearchNsByHref(cur->doc, cur, ns); if((nsPtr == NULL) || !xmlStrEqual(nsPtr->href, ns)) { nsPtr = xmlNewNs(cur, ns, NULL); } and I changed it to do this: nsPtr = xmlSearchNsByHref(cur->doc, cur, ns); if((nsPtr == NULL) || (xmlSearchNs(cur->doc, cur, nsPtr->prefix) != nsPtr)) { nsPtr = xmlNewNs(cur, ns, NULL); } Thanks again for the patch! Aleksey _______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
