diff options
author | jwise <jwise> | 2001-10-23 17:21:56 +0000 |
---|---|---|
committer | jwise <jwise> | 2001-10-23 17:21:56 +0000 |
commit | 91e84f47313c85a9ecc089e8785d5651241aa899 (patch) | |
tree | 3ad32e236c2236c8934e1773b2f6e205bfb2780e /www/ap-xslt/patches | |
parent | 4581147e67d495ea2492b9ea0726d989ef488752 (diff) | |
download | pkgsrc-91e84f47313c85a9ecc089e8785d5651241aa899.tar.gz |
Integrate a patch from the sourceforge page for this project.
With this patch, the sablotron base URI for xslt processing is set to the
current working directory, so document inclusion (ala
<xsl:apply-templates select="document(data/test.xml)" />
) will DTRT.
Bump the pkg version to 1.1nb1, as stylesheets written for the new version
may not work with the old.
Diffstat (limited to 'www/ap-xslt/patches')
-rw-r--r-- | www/ap-xslt/patches/patch-aa | 1 | ||||
-rw-r--r-- | www/ap-xslt/patches/patch-ab | 32 |
2 files changed, 31 insertions, 2 deletions
diff --git a/www/ap-xslt/patches/patch-aa b/www/ap-xslt/patches/patch-aa index 8664cba2092..b9a9d4772fe 100644 --- a/www/ap-xslt/patches/patch-aa +++ b/www/ap-xslt/patches/patch-aa @@ -1,3 +1,4 @@ +$NetBSD: patch-aa,v 1.2 2001/10/23 17:21:57 jwise Exp $ --- Makefile.orig Wed Aug 23 22:30:50 2000 +++ Makefile Tue Sep 25 15:12:22 2001 @@ -1,12 +1,12 @@ diff --git a/www/ap-xslt/patches/patch-ab b/www/ap-xslt/patches/patch-ab index 13059eb13fc..119f7a52b53 100644 --- a/www/ap-xslt/patches/patch-ab +++ b/www/ap-xslt/patches/patch-ab @@ -1,5 +1,9 @@ ---- mod_xslt.c.orig Tue Sep 25 15:15:15 2001 -+++ mod_xslt.c Tue Sep 25 15:15:42 2001 +$NetBSD: patch-ab,v 1.2 2001/10/23 17:21:57 jwise Exp $ +This patch incorporates a patch from the mod_xslt project page on sourceforge +in order to have a valid base URI set during xslt processing, so that document +inclusion will DTRT. +--- mod_xslt.c.orig Wed Aug 23 22:05:28 2000 ++++ mod_xslt.c Tue Oct 23 12:43:12 2001 @@ -43,7 +43,7 @@ #include "http_protocol.h" #include "ap_config.h" @@ -9,3 +13,27 @@ #include "http_core.h" #include "sablot.h" #include "http_log.h" +@@ -195,6 +195,8 @@ + + int transform(request_rec *r, char *styleSheetStr, char *inputStr, char **resultStr) { + int se; ++ char *cwd = NULL; ++ char *baseURI = NULL; + char *argums[] = + { + "/_stylesheet", styleSheetStr, +@@ -209,6 +211,14 @@ + se = SablotCreateProcessor (&theproc); + if (cfg->debug) + se |= SablotRegHandler(theproc, HLR_MESSAGE, &sablotMH, (void*)r); ++ ++ /* get current working directory */ ++ cwd = ap_palloc(r->pool, MAXCHAR +1); ++ getcwd(cwd, MAXCHAR); ++ ++ /* set base URI to cwd */ ++ baseURI = ap_pstrcat(r->pool, "file://", cwd, "/", NULL); ++ se |= SablotSetBase(theproc, baseURI); + se |= SablotRunProcessor(theproc,"arg:/_stylesheet","arg:/_xmlinput","arg:/_output",NULL,argums); + se |= SablotGetResultArg(theproc,"arg:/_output", resultStr); + se |= SablotDestroyProcessor(theproc); |