[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] use choose in call-templates not possble


Subject: Re: [xsl] use choose in call-templates not possble
From: TW <zupftom@xxxxxxxxxxxxxx>
Date: Thu, 10 May 2012 14:34:22 +0200

2012/5/10 henry human <henry_human@xxxxxxxx>:
>
> I am doing this
>    <xsl:variable name="Fcfactor">
>       <xsl:call-template name="translateDcml">
>       <xsl:choose>
>       <xsl:when test="FCDecimalPlace  != ''">
>
>
>        <xsl:with-param name="factor" select="FCDecimalPlace"/>
>
>       <xsl:otherwise>
>       <xsl:with-param name="factor" select="LCDecimalPlace"/>
>         </xsl:otherwise>
>         </xsl:choose>
>      </xsl:call-template>
>      </xsl:variable>
>

Like Ken suggested, do this instead:

<xsl:call-template name="translateDcml">
  <xsl:with-param name="factor">
    <xsl:choose>
      <xsl:when test="FCDecimalPlace  != ''">
        <xsl:value-of select="FCDecimalPlace"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="LCDecimalPlace"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:with-param>
</xsl:call-template>

Thomas W.


Current Thread