This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Result count in a for-each with an embedded if
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Result count in a for-each with an embedded if
- From: "Bob DuCharme" <bob at udico dot com>
- Date: Tue, 19 Jun 2001 13:05:04 -0400
- References: <20010619155619.7046.qmail@bilbo.truetrue.net>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Tring to do a count of the results of the following snip:
...
> There were XX articles found.
I'm not sure about the role of the xsl:if and the translate() in your
counting. Do you want to just count the number of articles, in which case
you only need the count function,
<xsl:template match="articles">
<!-- whatever else -->
There were <xsl:value-of select="count(article)"/> articles found.
</xsl:template>
or do you need to only count articles meeting a certain condition?
Bob DuCharme www.snee.com/bob <bob@
snee.com> see http://www.snee.com/bob/xsltquickly for
info on new book "XSLT Quickly" from Manning Publications.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list