I'm using Diazo (formerly XDV) to theme some internal websites, using Apache and mod_transform_html. I was hoping I could make use of multiple distinct themes by putting TransformSet directives inside Location directives, like this:
<Location /blog/>
TransformSet /themes/blog.xsl
</Location>
<Location />
TransformSet /themes/main.xsl
</Location>
Unfortunately, it looks like the TransformSet directive for / always takes precedence. I've solved this for the time being by moving content from / to /main and adding:
RewriteRule ^/$ /main/ [R]
<Location /main/>
TransformSet /themes/main.xsl
</Location>
This works, but I would rather be able to host this content rooted at /.
So...is there a way to override a transformation applied to /? This sort of thing seems to work for other Apache configuration directives (e.g., ProxyPass).
I never got around to finishing the paramater support for mod_transform, but if you can choose between themes based on page content, then you could use something like:
This reminds me I should add an if-not-content so you can use a css selector there. For more, see: http://diazo.org/advanced.html#multiple-conditional-themes
It might be easier though just to use LocationMatch instead for the root theme, something like:
That would avoid both TransformSet directives applying to the same request.