Index: parser.c =================================================================== RCS file: /sources/public/XML/parser.c,v retrieving revision 1.190 diff -p -r1.190 parser.c *** parser.c 2000/04/12 13:26:13 1.190 --- parser.c 2000/04/15 15:18:56 *************** xmlSAXParseDTD(xmlSAXHandlerPtr sax, con *** 9768,9779 **** /* * let's parse that entity knowing it's an external subset. */ xmlParseExternalSubset(ctxt, ExternalID, SystemID); if (ctxt->myDoc != NULL) { if (ctxt->wellFormed) { ! ret = ctxt->myDoc->intSubset; ! ctxt->myDoc->intSubset = NULL; } else { ret = NULL; } --- 9768,9783 ---- /* * let's parse that entity knowing it's an external subset. */ + ctxt->inSubset = 2; + ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0"); + ctxt->myDoc->extSubset = xmlNewDtd(ctxt->myDoc, BAD_CAST "none", + ExternalID, SystemID); xmlParseExternalSubset(ctxt, ExternalID, SystemID); if (ctxt->myDoc != NULL) { if (ctxt->wellFormed) { ! ret = ctxt->myDoc->extSubset; ! ctxt->myDoc->extSubset = NULL; } else { ret = NULL; } Index: tree.c =================================================================== RCS file: /sources/public/XML/tree.c,v retrieving revision 1.102 diff -p -r1.102 tree.c *** tree.c 2000/04/07 16:32:11 1.102 --- tree.c 2000/04/15 15:19:02 *************** xmlStaticCopyNodeList(xmlNodePtr node, x *** 2282,2298 **** while (node != NULL) { q = xmlStaticCopyNode(node, doc, parent, 1); ! if (parent == NULL) { ! if (ret == NULL) ret = q; } else { ! if (ret == NULL) { ! q->prev = NULL; ! ret = p = q; ! } else { ! p->next = q; ! q->prev = p; ! p = q; ! } } node = node->next; } --- 2282,2294 ---- while (node != NULL) { q = xmlStaticCopyNode(node, doc, parent, 1); ! if (ret == NULL) { ! q->prev = NULL; ! ret = p = q; } else { ! p->next = q; ! q->prev = p; ! p = q; } node = node->next; } *************** xmlCopyDoc(xmlDocPtr doc, int recursive) *** 2415,2421 **** if (doc->oldNs != NULL) ret->oldNs = xmlCopyNamespaceList(doc->oldNs); if (doc->children != NULL) ! ret->children = xmlStaticCopyNodeList(doc->children, ret, NULL); return(ret); } --- 2411,2418 ---- if (doc->oldNs != NULL) ret->oldNs = xmlCopyNamespaceList(doc->oldNs); if (doc->children != NULL) ! ret->children = xmlStaticCopyNodeList(doc->children, ret, ! (xmlNodePtr)ret); return(ret); }