This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Result count in a for-each with an embedded if


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]