This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Alternating Row Colors using XLS
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Alternating Row Colors using XLS
- From: "Tim Watts" <timw at 3d3 dot com>
- Date: Tue, 12 Jun 2001 14:13:38 +1000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Kevin,
Here is how I have done alternating row colours
Tim :)
<xsl:template match="orders">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<tr class="odd">
<xsl:call-template name="showdata" />
</tr>
</xsl:when>
<xsl:otherwise>
<tr class="even">
<xsl:call-template name="showdata" />
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
>
>----- Original Message -----
>From: "Kevin Shallow" <sourjan@yahoo.com>
>To: <XSL-List@lists.mulberrytech.com>
>Sent: Monday, June 11, 2001 5:54 PM
>Subject: [xsl] Alternating Row Colors using XLS
>
>
> > I want to
> > alternate the row colors.
> >
> > I would normally just use modular division and divdie
> > the row number by 2. If the reault was zero, I'd use
> > the alternating color. I don't seem to be able to find
> > a mod operator in XLS, but I assume there is some
> > facility to let me do this.
> >
> > Does any have any ideas?
> >
> > _Kevin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list