diff options
author | William M. Brack <wbrack@src.gnome.org> | 2004-07-26 00:20:13 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2004-07-26 00:20:13 +0000 |
commit | b85c9205f94921a61a08ddedbb3605fd7ef69b12 (patch) | |
tree | c3bdf04c77e62b1adeaae1e7c53e2ab8ea91f449 | |
parent | cd3628b7dd46b39d94c78fd4989cb5af976f86de (diff) | |
download | android_external_libxml2-b85c9205f94921a61a08ddedbb3605fd7ef69b12.tar.gz android_external_libxml2-b85c9205f94921a61a08ddedbb3605fd7ef69b12.tar.bz2 android_external_libxml2-b85c9205f94921a61a08ddedbb3605fd7ef69b12.zip |
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)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | xinclude.c | 10 |
2 files changed, 17 insertions, 0 deletions
@@ -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 @@ -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++; |