forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: Dynamic include of stylesheets
Date Wed, 23 Mar 2005 15:16:48 GMT
On Wed, 2005-03-23 at 13:19 +0000, Michael Kay wrote at 
> We used to get a lot of variations on attempts to do dynamic inclusion, but
> this is one of the most imaginative.
> xsl:include is a compile time construct, it's effect happens right at the
> start of processing, to assemble a stylesheet for compilation. There's no
> way a variable can be evaluated before the stylesheet has been compiled, so
> trying to refer to a variable here simply isn't going to work.
> dyn:evaluate() does things at run-time that would normally be done at
> compile-time, it isn't going to enable you to do at compile time something
> (evaluating a variable) that can only possibly be done at run-time. I have to find another way. :(


On Wed, 2005-03-23 at 12:08 +0100, Thorsten Scherler wrote:
> Hello devs,
> last night I committed the last changes on leather and fbits plugin.
> When I tested the per page view generation (after the commit) I had to
> see that it is not working.
> The fallback stylesheets are always included and not the site specific
> view. I am trying to include in the leather-dev site2xhtml.xsl
> (main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl) the
> "$filename-noext".fv by calling:
> <xsl:include
> href="cocoon:/prepare.include.dyn:evaluate('$filename-noext')"/>
> Which should resolve the xsl:stylesheets from the fbits-plugin and
> include them in the site2xhtml.
> ...but it seems that the dyn:evaluate('$filename-noext') will not
> resolved like I expect. :( I tried with "index" as $filename-noext and I
> implemented a special view for index.
> when I change the above code to 
> <xsl:include href="cocoon:/prepare.include.index"/>
> I get the right result. Changing back brings the default view. :(
> Any ideas for a workaround or way to debug that the per page view is
> working the way I want (including dynamic xsl:includes).
> NOTE: If you are using leather-dev you HAVE TO also use the fbits-plugin
> in your project!!! Leather-dev and the fbits templates are using
> Scale-dev css as default style implementation.

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message