diff --git "a/parser_HEAD.c" "b/parser.c" index d1c7888..9ab8641 100644 --- "a/parser_HEAD.c" +++ "b/parser.c" @@ -6992,6 +6992,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { ent->owner = 1; while (list != NULL) { list->parent = (xmlNodePtr) ent; + xmlSetTreeDoc(list, ent->doc); if (list->next == NULL) ent->last = list; list = list->next;