On Sun, Nov 14, 2004 at 01:16:15PM +0100, Carlo Contavalli wrote:
> > * I can't get XSLTAddRule to take effect regardless of whether the xml
> > file has the stylesheet PI or not. What I want to do is invoke the
> > stylesheet specified in the URL but this has no effect:
> > XSLTAddRule "$GET[stylesheet].xsl" "$GET[stylesheet]"
> > given an URL like foo.xml?stylesheet=mysheet
> strange. This should work without problems. I'll try to get a better
> look to that code.
I tryed exactly your same XSLTAddRule as above, but it works for
me (tm). I've made several tests, but it always behaved correctly,
with or without existing stylesheets. Watch out for other XSLT
instructions. This is the precedence order (instructions above
override those below):
- XSLTSetStylesheet
- XSLTAddRule
- <?modxslt-stylesheet || <?xslt-stylesheet, first one
matching
- XSLTDefaultStylesheet
In all above cases, if any of the instructions is found and the
corresponding expression (if any) found matching, the stylesheet
is either applyed or an error returned back to the browser.
XSLTSetStylesheet and XSLTDefaultStylesheet do not take any
expression.
Whatch out that those instructions are hierarchically inherited,
this means that if you set a stylesheet in a given directory,
all directories below will have that stylesheet set.
At worst, try to configure mod-xslt with --enable-debug, and
send the error.log.
Hope this helps,
Cheers,
Carlo
--
GPG Fingerprint: 2383 7B14 4D08 53A4 2C1A CA29 9E98 5431 1A68 6975
-------------
But what can you do with it? -- ubiquitous cry from Linux-user partner.
(Submitted by Andy Pearce, ajp@xxxxxxxxxxxxxxxx)