[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: xsl:call-template name="$tempname"
From: Ming <myu@xxxxxxxx>
Date: Fri, 24 May 2002 16:51:44 -0600
Thanks, I think I'll go with the first solution.

Ming

Joerg Heinicke wrote:

> 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


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


Current Thread
  • xslt generator
    • Ming - Fri, 24 May 2002 14:38:54 -0400 (EDT)
      • E L - Fri, 24 May 2002 15:12:40 -0400 (EDT)
        • Ming - Fri, 24 May 2002 18:39:27 -0400 (EDT)
          • Joerg Heinicke - Fri, 24 May 2002 18:48:30 -0400 (EDT)
          • Ming - Fri, 24 May 2002 18:59:19 -0400 (EDT) <=
          • David Carlisle - Sat, 25 May 2002 13:08:12 -0400 (EDT)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member