Sweet. Is this documented anywhere? If not, I'll try and find somewhere useful to add it.
Good idea.
A related question -- can we get at the Apache configuration settings through a similar mechanism? Or at least any variables that have been set with PerlSetVar?
You could pretty easily make a Plugin that passes what you need from $r->dir_config in as params.
Maybe with a namespace?
XSLT params don't have namespaces.
If its potential name collision with other form or query params that you're concerned about, use a freakish (but descriptive) naming convention that no one in their right mind would ever use for form data.
Something like:
(in httpd.conf )
PerlSeVar MyVar1 'foo' PerlSeVar MyVar2 'bar'
( in your Plugin )
sub handler {
my $r = shift;
my $cgi = Apache::Request->instance($r); foreach my $varname ( qw( MyVar1 MyVar2 ) ) {
if ( my $val = $r->dir_config($varname) ) {
$cgi->parms->set('perlvar.' . $varname => $val);
}
}
return OK;
}( then in your stylesheet, at the top level )
<xsl:param name="perlvar.MyVar1">some default value</xsl:param> <xsl:param name="perlvar.MyVar2">some other default value</xsl:param>
Pretty cool, huh? Have a peek inside AddXSLParams::Request [1] if you get stuck.
HTH, -kip
[1] http://search.cpan.org/author/KHAMPTON/Apache-AxKit-Plugin-AddXSLParams-Request-1.01/Request.pm
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
