Commit b85c9205 authored by William M. Brack's avatar William M. Brack
Browse files

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)
parent cd3628b7
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
......
......@@ -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++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment