This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: send 'with-param' determined by test
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] send 'with-param' determined by test
- From: "Swen Thuemmler" <Swen dot Thuemmler at paderlinx dot de>
- Date: Mon, 7 May 2001 08:52:05 +0200 (CEST)
- cc: Tim Watts <timw at 3d3 dot com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
On Mon, 7 May 2001, Tim Watts wrote:
[...]
> I have included the code below.
>
> <xsl:call-template name="date-stripper">
> <xsl:choose>
> <xsl:when test="/document/transient/param[@name = 'from-year']">
> <xsl:with-param name="start-date-year"
> select="/document/transient/param[@name = 'from-year']" />
> </xsl:when>
> <xsl:otherwise>
> <xsl:with-param name="start-date-year"
> select="/document/data/merchant/start-date/@year" />
> </xsl:otherwise>
> </xsl:choose>
You have the ordering wrong. Try:
<xsl:call-template name="date-stripper">
<xsl:with-param name="start-date-year">
<xsl:choose>
<xsl:when test="/document/transient/param[@name = 'from-year']">
<xsl:value-of select="/document/transient/param[@name = 'from-year']" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/document/data/merchant/start-date/@year" />
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
Greetings, Swen
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list