summaryrefslogtreecommitdiff
path: root/xsltproc
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-10-19 21:35:47 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-10-19 21:35:47 +0000
commiteb955f5fe189ef3dd831c69741bf52a22c547433 (patch)
tree61561c9b741fd75b11eb9f0b113535fc0148a287 /xsltproc
parente0bbbefe2ea847e0a9aff4f802db18ae8e8bfe7a (diff)
downloadlibxslt-eb955f5fe189ef3dd831c69741bf52a22c547433.tar.gz
libxslt-eb955f5fe189ef3dd831c69741bf52a22c547433.tar.bz2
libxslt-eb955f5fe189ef3dd831c69741bf52a22c547433.zip
bump the libxml2 require to 2.6.0 which should ship for good real soon...
* configure.in: bump the libxml2 require to 2.6.0 which should ship for good real soon... * doc/Makefile.am: fix installation of HTML pages * doc/libxslt-api.xml: rebuilt * libxslt/xsltexports.h: cleanup * python/generator.py: ATTRIBUTE_UNUSED is after the parameter * xsltproc/xsltproc.c: applied Crutcher Dunnavant --load-trace patch 2 Daniel
Diffstat (limited to 'xsltproc')
-rw-r--r--xsltproc/xsltproc.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
index a82af9ae..ea937b74 100644
--- a/xsltproc/xsltproc.c
+++ b/xsltproc/xsltproc.c
@@ -94,6 +94,7 @@ static int noout = 0;
#ifdef LIBXML_HTML_ENABLED
static int html = 0;
#endif
+static int load_trace = 0;
#ifdef LIBXML_XINCLUDE_ENABLED
static int xinclude = 0;
#endif
@@ -171,6 +172,13 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
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);
}
}
@@ -182,12 +190,20 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
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) {
@@ -476,6 +492,9 @@ static void usage(const char *name) {
printf("\t--novalid skip the Dtd loading phase\n");
printf("\t--noout: do not dump the result\n");
printf("\t--maxdepth val : increase the maximum depth\n");
+#if LIBXML_VERSION >= 20600
+ printf("\t--maxparserdepth val : increase the maximum parser depth\n");
+#endif
#ifdef LIBXML_HTML_ENABLED
printf("\t--html: the input document is(are) an HTML file(s)\n");
#endif
@@ -497,6 +516,7 @@ static void usage(const char *name) {
#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");
@@ -630,6 +650,9 @@ main(int argc, char **argv)
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++;
@@ -677,6 +700,17 @@ main(int argc, char **argv)
if (value > 0)
xsltMaxDepth = value;
}
+#if LIBXML_VERSION >= 20600
+ } else if ((!strcmp(argv[i], "-maxparserdepth")) ||
+ (!strcmp(argv[i], "--maxparserdepth"))) {
+ int value;
+
+ i++;
+ if (sscanf(argv[i], "%d", &value) == 1) {
+ if (value > 0)
+ xmlParserMaxDepth = value;
+ }
+#endif
} else if ((!strcmp(argv[i],"-dumpextensions"))||
(!strcmp(argv[i],"--dumpextensions"))) {
dumpextensions++;
@@ -714,6 +748,12 @@ main(int argc, char **argv)
(!strcmp(argv[i], "--maxdepth"))) {
i++;
continue;
+#if LIBXML_VERSION >= 20600
+ } else if ((!strcmp(argv[i], "-maxparserdepth")) ||
+ (!strcmp(argv[i], "--maxparserdepth"))) {
+ i++;
+ continue;
+#endif
} else if ((!strcmp(argv[i], "-o")) ||
(!strcmp(argv[i], "-output")) ||
(!strcmp(argv[i], "--output"))) {