--- libxslt-1.0.27/xsltproc/xsltproc.c 2003-10-15 15:08:07.000000000 -0500 +++ libxslt-1.0.27.maxparserdepth/xsltproc/xsltproc.c 2003-10-15 15:09:59.000000000 -0500 @@ -476,6 +476,7 @@ 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"); + printf("\t--maxparserdepth val : increase the maximum parser depth\n"); #ifdef LIBXML_HTML_ENABLED printf("\t--html: the input document is(are) an HTML file(s)\n"); #endif @@ -687,6 +688,15 @@ if (value > 0) xsltMaxDepth = value; } + } 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; + } } else if ((!strcmp(argv[i],"-dumpextensions"))|| (!strcmp(argv[i],"--dumpextensions"))) { dumpextensions++; @@ -724,6 +734,10 @@ (!strcmp(argv[i], "--maxdepth"))) { i++; continue; + } else if ((!strcmp(argv[i], "-maxparserdepth")) || + (!strcmp(argv[i], "--maxparserdepth"))) { + i++; + continue; } else if ((!strcmp(argv[i], "-o")) || (!strcmp(argv[i], "-output")) || (!strcmp(argv[i], "--output"))) {