Subject: Re: [xsl] Avoiding multiple "apply-templates" by creating one variable for the clauses. Is it possible? From: Michael Schäfer <michael.schaefer@xxxxxxxxxxx> Date: Thu, 20 Aug 2009 13:30:54 +0200 |
<xsl:choose> <xsl:when test="$AuthorId"> <xsl:apply-templates select="//blog[author_id = $AuthorId]"/> </xsl:when> <xsl:when test="$CategoryId"> <xsl:apply-templates select="//blog[category_id = $CategoryId]"/> </xsl:when> <xsl:when test="$AuthorId and $CategoryId"> <xsl:apply-templates select="//blog[author_id = $AuthorId and category_id = $CategoryId]"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="//blog"/> </xsl:otherwise> </xsl:choose>
So I wonder if the third xsl:when would execute at all, because if either $AuthorId or $CategoryId evaluate to true, one of the first two xsl:when should be satisfied.
* michael.schaefer@xxxxxxxxxxx http://www.destatis.de * http://www.statspez.de
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Avoiding multiple "apply-, Andrew Welch | Thread | RE: [xsl] Avoiding multiple "apply-, Kate Busch-Petersen |
Re: [xsl] flat list of contents and, Martin Honnen | Date | RE: [xsl] Avoiding multiple "apply-, Kate Busch-Petersen |
Month |