[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: dyn:evaluate question

Subject: RE: dyn:evaluate question
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 23 Mar 2005 13:19:42 -0000
dyn evaluate
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@xxxxxxxxxx] 
> Sent: 23 March 2005 13:00
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.