--- libxslt-1.0.27.orig/xsltproc/xsltproc.c 2003-10-15 15:08:07.000000000 -0500 +++ libxslt-1.0.27/xsltproc/xsltproc.c 2003-10-19 08:08:01.000000000 -0500 @@ -100,6 +100,7 @@ #ifdef LIBXML_HTML_ENABLED static int html = 0; #endif +static int load_trace = 0; #ifdef LIBXML_XINCLUDE_ENABLED static int xinclude = 0; #endif @@ -167,6 +168,13 @@ if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; + if (load_trace) { + fprintf \ + (stderr, + "Loaded URL=\"%s\" ID=\"%s\"\n", + URL ? URL : "(null)", + ID ? ID : "(null)"); + } return(ret); } } @@ -178,12 +186,20 @@ newURL = xmlStrcat(newURL, (const xmlChar *) URL); if (newURL != NULL) { ret = defaultEntityLoader((const char *)newURL, ID, ctxt); - xmlFree(newURL); if (ret != NULL) { if (warning != NULL) ctxt->sax->warning = warning; + if (load_trace) { + fprintf \ + (stderr, + "Loaded URL=\"%s\" ID=\"%s\"\n", + newURL, + ID ? ID : "(null)"); + } + xmlFree(newURL); return(ret); } + xmlFree(newURL); } } if (warning != NULL) { @@ -500,6 +516,7 @@ #ifdef LIBXML_XINCLUDE_ENABLED printf("\t--xinclude : do XInclude processing on document intput\n"); #endif + printf("\t--load-trace : print trace of all external entites loaded\n"); printf("\t--profile or --norman : dump profiling informations \n"); printf("\nProject libxslt home page: http://xmlsoft.org/XSLT/\n"); printf("To report bugs and get help: http://xmlsoft.org/XSLT/bugs.html\n"); @@ -638,6 +655,9 @@ xinclude++; xsltSetXIncludeDefault(1); #endif + } else if ((!strcmp(argv[i], "-load-trace")) || + (!strcmp(argv[i], "--load-trace"))) { + load_trace++; } else if ((!strcmp(argv[i], "-param")) || (!strcmp(argv[i], "--param"))) { i++;