mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition
* tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition of the removal of redundant ns-decls.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Thu Feb 2 13:11:26 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
||||||
|
|
||||||
|
* tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt
|
||||||
|
the previous addition of the removal of redundant ns-decls.
|
||||||
|
|
||||||
Wed Feb 1 17:32:25 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
Wed Feb 1 17:32:25 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
||||||
|
|
||||||
* tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove
|
* tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove
|
||||||
|
8
tree.c
8
tree.c
@@ -8123,7 +8123,8 @@ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||||||
*/
|
*/
|
||||||
if (cur->nsDef != NULL) {
|
if (cur->nsDef != NULL) {
|
||||||
prevns = NULL;
|
prevns = NULL;
|
||||||
for (ns = cur->nsDef; ns != NULL; ns = ns->next) {
|
ns = cur->nsDef;
|
||||||
|
while (ns != NULL) {
|
||||||
if (! parnsdone) {
|
if (! parnsdone) {
|
||||||
if ((elem->parent) &&
|
if ((elem->parent) &&
|
||||||
((xmlNodePtr) elem->parent->doc != elem->parent)) {
|
((xmlNodePtr) elem->parent->doc != elem->parent)) {
|
||||||
@@ -8165,7 +8166,7 @@ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||||||
prevns->next = ns->next;
|
prevns->next = ns->next;
|
||||||
else
|
else
|
||||||
cur->nsDef = ns->next;
|
cur->nsDef = ns->next;
|
||||||
goto adopt_ns;
|
goto next_ns_decl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8198,11 +8199,12 @@ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||||||
goto internal_error;
|
goto internal_error;
|
||||||
|
|
||||||
prevns = ns;
|
prevns = ns;
|
||||||
|
next_ns_decl:
|
||||||
|
ns = ns->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! adoptns)
|
if (! adoptns)
|
||||||
goto ns_end;
|
goto ns_end;
|
||||||
adopt_ns:
|
|
||||||
/* No break on purpose. */
|
/* No break on purpose. */
|
||||||
case XML_ATTRIBUTE_NODE:
|
case XML_ATTRIBUTE_NODE:
|
||||||
/* No ns, no fun. */
|
/* No ns, no fun. */
|
||||||
|
Reference in New Issue
Block a user