RE: Wish List: Allow <xsl:choose> within <xsl:call-template>

Subject: RE: Wish List: Allow <xsl:choose> within <xsl:call-template>
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Wed, 10 Nov 1999 15:17:40 -0700
Clark Evans wrote:
> One of the first things which I found disturbing with 
> XSL is that the calling mechanism is extremely tedious.
> However, there is an unexpected advantage to this 
> mechanism (if it were allowed):
> 
> [template that accepts 2 params ($one and $two) and 
> sets default values for them if they're not passed]
>
> [template that accepts 1 param ($one) and may pass
> that as the value for the $one param when calling
> the first template, depending on some condition]

I don't get it. Did your example templates demonstrate what you were trying
to say? It seems like this would do just as well in the second template, and
wouldn't be that much more tedious:

  <xsl:choose>
    <xsl:when test="$one">
      <xsl:call-template name="base-function">
        <xsl:with-param name="one" select="$one" />
      </xsl:call-template>
    </xsl:when>
    <xsl:when test="$done" >
      <xsl:call-template name="base-function">
        <xsl:with-param name="one" select="$done" />
      </xsl:call-template>
    </xsl:when>
  </xsl:choose>

-Mike


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


Current Thread