From f32d5c181daca4ad1f7c01b86960748bbc2ad500 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 11 Oct 2006 21:19:49 +0000 Subject: [PATCH] applied fix for accessor functions of a stylesheet returning pointers to * python/libxslt-python-api.xml: applied fix for accessor functions of a stylesheet returning pointers to immutable strings, patch from #320540 * xsltproc/xsltproc.c: fix the xinclude on stylehseet problem by adding a new parameter to xsltproc names --xincludestyle Daniel --- ChangeLog | 8 ++++++++ python/libxslt-python-api.xml | 8 ++++---- xsltproc/xsltproc.c | 21 ++++++++++++++------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2e61d0..b625c98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Oct 11 23:16:10 CEST 2006 Daniel Veillard + + * python/libxslt-python-api.xml: applied fix for accessor functions + of a stylesheet returning pointers to immutable strings, patch + from #320540 + * xsltproc/xsltproc.c: fix the xinclude on stylehseet problem + by adding a new parameter to xsltproc names --xincludestyle + Wed Oct 11 22:27:37 CEST 2006 Daniel Veillard * xsltproc/xsltproc.c: apply patch from Gary Coady to compile when diff --git a/python/libxslt-python-api.xml b/python/libxslt-python-api.xml index 4c411af..8fbaacf 100644 --- a/python/libxslt-python-api.xml +++ b/python/libxslt-python-api.xml @@ -141,22 +141,22 @@ Get the output method of a stylesheet - + Get the output method URI of a stylesheet - + Get the output version of a stylesheet - + Get the output encoding of a stylesheet - + diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index 15848f4..7f6eeab 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -85,6 +85,7 @@ static int html = 0; static int load_trace = 0; #ifdef LIBXML_XINCLUDE_ENABLED static int xinclude = 0; +static int xincludestyle = 0; #endif static int profile = 0; @@ -514,6 +515,7 @@ static void usage(const char *name) { #endif #ifdef LIBXML_XINCLUDE_ENABLED printf("\t--xinclude : do XInclude processing on document input\n"); + printf("\t--xincludestyle : do XInclude processing on stylesheets\n"); #endif printf("\t--load-trace : print trace of all external entites loaded\n"); printf("\t--profile or --norman : dump profiling informations \n"); @@ -652,6 +654,9 @@ main(int argc, char **argv) } else if ((!strcmp(argv[i], "-xinclude")) || (!strcmp(argv[i], "--xinclude"))) { xinclude++; + } else if ((!strcmp(argv[i], "-xincludestyle")) || + (!strcmp(argv[i], "--xincludestyle"))) { + xincludestyle++; xsltSetXIncludeDefault(1); #endif } else if ((!strcmp(argv[i], "-load-trace")) || @@ -779,16 +784,18 @@ main(int argc, char **argv) style = xmlReadFile((const char *) argv[i], NULL, options); if (timing) endTimer("Parsing stylesheet %s", argv[i]); - if (style != NULL) { - if (timing) - startTimer(); + if (xincludestyle) { + if (style != NULL) { + if (timing) + startTimer(); #if LIBXML_VERSION >= 20603 - xmlXIncludeProcessFlags(style, XSLT_PARSE_OPTIONS); + xmlXIncludeProcessFlags(style, XSLT_PARSE_OPTIONS); #else - xmlXIncludeProcess(style); + xmlXIncludeProcess(style); #endif - if (timing) { - endTimer("XInclude processing %s", argv[i]); + if (timing) { + endTimer("XInclude processing %s", argv[i]); + } } } if (style == NULL) { -- 2.7.4