mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-23 17:33:50 +03:00
- xinclude.c: Raphael Hertzog had a trouble with DTD nodes
being processed, applied his patch - tree.c: fixed a bug raised in xmlStaticCopyNodeList() Daniel
This commit is contained in:
parent
f3afa7dd4e
commit
4497e6984d
@ -1,3 +1,9 @@
|
||||
Sat Jun 9 16:10:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* xinclude.c: Raphael Hertzog had a trouble with DTD nodes
|
||||
being processed, applied his patch
|
||||
* tree.c: fixed a bug raised in xmlStaticCopyNodeList()
|
||||
|
||||
Sat Jun 9 15:50:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* nanoftp.c nanohttp.c uri.c include/win32config.h: Igor Zlatkovic
|
||||
|
4
tree.c
4
tree.c
@ -2750,6 +2750,10 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
|
||||
while (node != NULL) {
|
||||
if( node->type == XML_DTD_NODE ) {
|
||||
if (doc == NULL) {
|
||||
node = node->next;
|
||||
continue;
|
||||
}
|
||||
if (doc->intSubset == NULL) {
|
||||
q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
q->doc = doc;
|
||||
|
18
xinclude.c
18
xinclude.c
@ -407,12 +407,26 @@ loaded:
|
||||
if (fragment == NULL) {
|
||||
/*
|
||||
* Add the top children list as the replacement copy.
|
||||
* ISSUE: seems we should scrap DTD info from the copied list.
|
||||
*/
|
||||
if (doc == NULL)
|
||||
{
|
||||
/* Hopefully a DTD declaration won't be copied from
|
||||
* the same document */
|
||||
ctxt->repTab[nr] = xmlCopyNodeList(ctxt->doc->children);
|
||||
else
|
||||
} else {
|
||||
/* DTD declarations can't be copied from included files */
|
||||
xmlNodePtr node = doc->children;
|
||||
while (node != NULL)
|
||||
{
|
||||
if (node->type == XML_DTD_NODE)
|
||||
{
|
||||
xmlUnlinkNode(node);
|
||||
xmlFreeNode(node);
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
ctxt->repTab[nr] = xmlCopyNodeList(doc->children);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Computes the XPointer expression and make a copy used
|
||||
|
Loading…
Reference in New Issue
Block a user