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: Alternating Row Colors using XLS


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


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