Commit 8eabb05d authored by William M. Brack's avatar William M. Brack
Browse files

fixed a problem with internal cleanup of <DIV> element (bug 143738).

* relaxng.c: fixed a problem with internal cleanup of <DIV> element
  (bug 143738).
parent f7789b13
Mon Jun 7 22:14:58 HKT 2004 William Brack <wbrack@mmm.com.hk>
* relaxng.c: fixed a problem with internal cleanup of <DIV> element
(bug 143738).
Mon Jun 7 16:57:43 HKT 2004 William Brack <wbrack@mmm.com.hk>
 
* uri.c, include/libxml/uri.h: added a new routine
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment