1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-07 10:42:55 +03:00

applying a patch based on #117377 for --path option. Daniel

* xsltproc/xsltproc.c: applying a patch based on #117377
  for --path option.
Daniel
This commit is contained in:
Daniel Veillard
2003-07-23 21:46:39 +00:00
parent df6397cd50
commit 1895007219
2 changed files with 14 additions and 1 deletions

View File

@@ -160,6 +160,14 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
warningSAXFunc warning = NULL;
int i;
const char *lastsegment = URL;
const char *iter = URL;
while (*iter != 0) {
if (*iter == '/')
lastsegment = iter + 1;
iter++;
}
if ((ctxt != NULL) && (ctxt->sax != NULL)) {
warning = ctxt->sax->warning;
@@ -179,7 +187,7 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
newURL = xmlStrdup((const xmlChar *) paths[i]);
newURL = xmlStrcat(newURL, (const xmlChar *) "/");
newURL = xmlStrcat(newURL, (const xmlChar *) URL);
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
if (newURL != NULL) {
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
xmlFree(newURL);