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

Re: telling an outer template which template to call..

Subject: Re: telling an outer template which template to call...
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 1 Sep 2003 23:09:40 +0200
template template para
See:

  "The Functional Programming Language XSLT - A proof through examples"
at


http://fxsl.sourceforge.net/articles/FuncProg/Functional%20Programming.html

or

"Functional programming in XSLT using the
FXSL library"

at


http://www.mulberrytech.com/Extreme/Proceedings/xslfo-pdf/2003/Novatchev01/EML2003Novatchev01.pdf



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Felix Breuer" <felix@xxxxxxxxxx> wrote in message
news:1062447181.9215.24.camel@xxxxxxxx
> Hello!
>
> I would like an outer template to call an inner template which is
> specified by a parameter. I.e. I would like to get the following example
> working:
>
> <xsl:template match="/">
>   <xsl:apply-templates select="foo">
>     <xsl:with-param name="para">bar</xsl:with-param>
>   </xsl:apply-templates select="foo">
> </xsl:template>
>
> <xsl:template match="foo">
>   <xsl:param name="para">moo</xsl:with-param>
>   ...
>   <xsl:call-template name="{$para}"/>
>   ...
> </xsl:template>
>
> <xsl:template name="bar">...</xsl:template>
> <xsl:template name="moo">...</xsl:template>
>
> I hope the above makes it clear what I am aiming at. [Obviously the
> whole stylesheet is going to be a bit more complicated or such an
> involved solution wouldn't be necessary.]
>
> Now, when I run the above through xsltproc (libxslt) I get errors like
>
> xsl:call-template : template {$para} not found
>
> Obviously, the problem is that the parameter $para is not expanded
> before the call-template element is executed.
>
> My questions are:
> 1) Is $para supposed not to be expanded in time? Or is this a bug in
> libxslt?
> 2) Is there a way to get this stylesheet working? With libxslt or any
> other processor?
>
> Thanks in advance,
> Felix Breuer
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.