summaryrefslogtreecommitdiff
path: root/relaxng.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-07-06 12:57:17 +0000
committerMike Hommey <mh@glandium.org>2004-07-06 12:57:17 +0000
commitc14c53a3645d81281058d4bb4cff24fa8d6faf33 (patch)
tree29bccc2e7499af078a3d1cdcfb517a1dee891be5 /relaxng.c
parentd4e028c96af89ade493b440d4f2de6b684c03a06 (diff)
downloadlibxml2-c14c53a3645d81281058d4bb4cff24fa8d6faf33.tar.gz
Load /tmp/tmp.DIvcnD/libxml2-2.6.11 intoupstream/2.6.11
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'relaxng.c')
-rw-r--r--relaxng.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/relaxng.c b/relaxng.c
index 6bf62ee..29cdb19 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -7182,6 +7182,20 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
}
if (ns != NULL)
xmlFree(ns);
+ /*
+ * Since we are about to delete cur, if it's nsDef is non-NULL we
+ * need to preserve it (it contains the ns definitions for the
+ * children we just moved). We'll just stick it on to the end
+ * of cur->parent's list, since it's never going to be re-serialized
+ * (bug 143738).
+ */
+ if (cur->nsDef != NULL) {
+ xmlNsPtr parDef = (xmlNsPtr)&cur->parent->nsDef;
+ while (parDef->next != NULL)
+ parDef = parDef->next;
+ parDef->next = cur->nsDef;
+ cur->nsDef = NULL;
+ }
delete = cur;
goto skip_children;
}