Subject: RE: Alternating Row Colors using XLS
From: "Tim Watts" <timw@xxxxxxx>
Date: Tue, 12 Jun 2001 14:13:38 +1000
|
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@xxxxxxxxx>
>To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
>Sent: Monday, June 11, 2001 5:54 PM
>Subject: 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
|