head 1.5; access; symbols pkgsrc-2014Q1:1.4.0.12 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.10 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.8 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.6 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.4 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.2 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.3.0.76 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.74 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.72 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.70 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.68 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.66 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.64 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.62 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.60 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.58 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.56 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.54 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.52 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.50 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.48 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.46 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.44 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.42 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.40 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.38 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.5 date 2014.06.10.15.22.16; author joerg; state dead; branches; next 1.4; commitid djgMkPoOrhNxnZDx; 1.4 date 2012.11.23.11.37.41; author joerg; state Exp; branches; next 1.3; 1.3 date 2003.05.31.14.41.32; author grant; state Exp; branches; next 1.2; 1.2 date 2001.10.23.17.21.57; author jwise; state Exp; branches; next 1.1; 1.1 date 2001.10.16.18.23.21; author jwise; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.10.16.18.23.21; author jwise; state Exp; branches; next ; desc @@ 1.5 log @Retire Apache 1.3 and 2.0. @ text @$NetBSD: patch-ab,v 1.4 2012/11/23 11:37:41 joerg 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. It also fixes two multi-line literals which are disallowed in gcc 3.3. --- mod_xslt.c.orig 2000-08-24 02:05:28.000000000 +0000 +++ mod_xslt.c @@@@ -43,7 +43,7 @@@@ #include "http_protocol.h" #include "ap_config.h" #include "util_uri.h" -#include "alloc.h" +#include "ap_alloc.h" #include "http_core.h" #include "sablot.h" #include "http_log.h" @@@@ -195,6 +195,8 @@@@ MessageHandler sablotMH = { 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 @@@@ int transform(request_rec *r, char *styl 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); @@@@ -288,12 +298,12 @@@@ static int mod_xslt_handler(request_rec if (!strcmp("xml",mimetype)) if (cfg->debug){ - return mod_xslt_debug_out(r, "XSLT DEBUG: \"AddHandler mod_xslt .xml\" will cause infinite - recursion. Remove it!\n"); - return ; + return mod_xslt_debug_out(r, "XSLT DEBUG: \"AddHandler mod_xslt .xml\" will cause infinite\n" + "recursion. Remove it!\n"); + return SERVER_ERROR; } else { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "\"AddHandler mod_xslt .xml\" will cause infinite - recursion. Remove it!\n"); + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "\"AddHandler mod_xslt .xml\" will cause infinite\n" + "recursion. Remove it!\n"); return SERVER_ERROR; } @ 1.4 log @Always return a value in non-void functions. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2003/05/31 14:41:32 grant Exp $ @ 1.3 log @fix a multiline literal, allowing this to be built with gcc-3.3. @ text @d1 1 a1 1 $NetBSD$ d9 1 a9 1 --- mod_xslt.c.orig Thu Aug 24 12:05:28 2000 d50 1 d53 1 a53 1 return ; d61 1 @ 1.2 log @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 ) will DTRT. Bump the pkg version to 1.1nb1, as stylesheets written for the new version may not work with the old. @ text @d2 1 d6 5 a10 2 --- mod_xslt.c.orig Wed Aug 23 22:05:28 2000 +++ mod_xslt.c Tue Oct 23 12:43:12 2001 d20 1 a20 1 @@@@ -195,6 +195,8 @@@@ d29 1 a29 1 @@@@ -209,6 +211,14 @@@@ d44 16 @ 1.1 log @Initial revision @ text @d1 6 a6 2 --- mod_xslt.c.orig Tue Sep 25 15:15:15 2001 +++ mod_xslt.c Tue Sep 25 15:15:42 2001 d16 24 @ 1.1.1.1 log @Import Userworld's Apache mod_xslt into pkgsrc. mod_xslt provides a simple, fast mechanism for doing XSLT transformations of XML content for presentation to the user. It doesn't seek to provide all the bells and whistles of, say, Cocoon, but being implemented natively and using an XSLT parser (sablotron) which is implemented natively, it provides a nice lightweight solution. @ text @@