This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xsl:call-template name="$tempname"


Hello Ming,

It's not possible. One thing you can do:

<xsl:when test="$tempname = 'foo'">
   <xsl:call-template name="foo"/>
</xsl:when>
<xsl:when test="$tempname = 'bar'">
   <xsl:call-template name="bar"/>
</xsl:when>

The other thing is to create your stylesheet by a transformation.

Joerg

Ming wrote:
> Hi,
> 
> I'm trying to use a variable as the xsl:call-template' name value as:
> 
> <xsl:call-template name='$tempname'>
> ....
> </xsl:call-template>
> 
> But the compile gave me error saying that it cannot find template $tempname
> which means it doesn't see $tempname as a variable but a string.
> 
> Do you have any idea how I can do this?
> 
> Thanks a lot in advance.
> 
> Ming


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]