mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-27 17:57:22 +03:00
added some code to check, when an include is done, whether the requested
* xinclude.c: added some code to check, when an include is done, whether the requested URL gets mapped to some other location (e.g. with a catalog entry) and, if so, take care of the xml:base properly (bug 146988)
This commit is contained in:
parent
cd3628b7dd
commit
b85c9205f9
@ -1,3 +1,10 @@
|
||||
Sun Jul 25 17:18:39 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* xinclude.c: added some code to check, when an include is
|
||||
done, whether the requested URL gets mapped to some other
|
||||
location (e.g. with a catalog entry) and, if so, take care
|
||||
of the xml:base properly (bug 146988)
|
||||
|
||||
Sun Jul 25 14:02:24 PDT 2004 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* error.c: fixed to assure user data param is set correctly
|
||||
|
10
xinclude.c
10
xinclude.c
@ -1459,6 +1459,16 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
|
||||
return(-1);
|
||||
}
|
||||
ctxt->incTab[nr]->doc = doc;
|
||||
/*
|
||||
* It's possible that the requested URL has been mapped to a
|
||||
* completely different location (e.g. through a catalog entry).
|
||||
* To check for this, we compare the URL with that of the doc
|
||||
* and change it if they disagree (bug 146988).
|
||||
*/
|
||||
if (!xmlStrEqual(URL, doc->URL)) {
|
||||
xmlFree(URL);
|
||||
URL = xmlStrdup(doc->URL);
|
||||
}
|
||||
for (i = nr + 1; i < ctxt->incNr; i++) {
|
||||
if (xmlStrEqual(URL, ctxt->incTab[i]->URI)) {
|
||||
ctxt->incTab[nr]->count++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user