mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
oops I was missing the xml:base fixup too this adds xml:base attributes to
* xinclude.c: oops I was missing the xml:base fixup too * result/XInclude/*.xml: this adds xml:base attributes to most results of the tests Daniel
This commit is contained in:
14
xinclude.c
14
xinclude.c
@ -892,6 +892,20 @@ loaded:
|
||||
xmlXPathFreeContext(xptrctxt);
|
||||
xmlFree(fragment);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the xml:base fixup if needed
|
||||
*/
|
||||
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
|
||||
xmlNodePtr node;
|
||||
|
||||
node = ctxt->repTab[nr];
|
||||
while (node != NULL) {
|
||||
if (node->type == XML_ELEMENT_NODE)
|
||||
xmlNodeSetBase(node, URL);
|
||||
node = node->next;
|
||||
}
|
||||
}
|
||||
xmlFree(URL);
|
||||
return(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user