[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: counting and displaying with xsl?


Subject: RE: counting and displaying with xsl?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Thu, 8 Jun 2000 11:22:43 +0100

> The following has worked for me before:
> 
> 		<xsl:if expr="(childNumber(this) % 5) == 1">
> 
Presumably in MS 1998 XSL: neither "expr=" nor "childNumber()" nor "this"
nor "%" nor "==" are valid in XSLT.

In XSLT the equivalent is
<xsl:if test="position() mod 5 = 1">

A wonderful example of how dissimilar these two languages are: five
differences in one line!

Mike Kay


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



Current Thread
Keywords