Index: tree.c =================================================================== RCS file: /cvs/gnome/gnome-xml/tree.c,v retrieving revision 1.151 diff -c -r1.151 tree.c *** tree.c 2001/06/29 21:31:06 1.151 --- tree.c 2001/07/08 21:19:31 *************** *** 1809,1819 **** --- 1809,1827 ---- */ void xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { + xmlAttrPtr prop; + if (tree == NULL) return; if (tree->type == XML_ENTITY_DECL) return; if (tree->doc != doc) { + prop = tree->properties; + while (prop != NULL) { + prop->doc = doc; + xmlSetListDoc(prop->children, doc); + prop = prop->next; + } if (tree->children != NULL) xmlSetListDoc(tree->children, doc); tree->doc = doc; *************** *** 2235,2248 **** "xmlAddChild : child == NULL\n"); #endif return(NULL); - } - - if ((cur->doc != NULL) && (parent->doc != NULL) && - (cur->doc != parent->doc)) { - #ifdef DEBUG_TREE - xmlGenericError(xmlGenericErrorContext, - "Elements moved to a different document\n"); - #endif } /* --- 2243,2248 ----