1
0
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:
Daniel Veillard
2002-08-14 14:45:25 +00:00
parent e3b7d9a165
commit c4bad4a77c
6 changed files with 24 additions and 4 deletions

View File

@ -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);
}