xsl-list
[Top] [All Lists]

RE: dyn:evaluate question

2005-03-23 06:19:42
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.

You don't need a workaround, you need a different design: but you haven't
said what the problem is, so I can't give you one.

Michael Kay
http://www.saxonica.com/



-----Original Message-----
From: Thorsten Scherler [mailto:thorsten(_at_)apache(_dot_)org] 
Sent: 23 March 2005 13:00
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] dyn:evaluate question

Hello list,

I am trying to dynamically include a stylesheet like this:
<xsl:variable name="request">index</xsl:variable>
<xsl:include href="cocoon:/prepare.include.dyn:evaluate($request)"/>

but the dyn:evaluate($request) -part will not get resolved.

As soon I change it to 
<xsl:include href="cocoon:/prepare.include.index"/>
I get my stylesheets.

Am I using the dyn:evaluate wrong? Are there a workaround?

TIA
-- 
thorsten

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>