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: "Gitanjali" <narsu at gitanjali dot com>
- Date: Mon, 11 Jun 2001 18:23:51 -0400
- References: <20010611215427.13334.qmail@web9603.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
See this link for alternate colors
http://www.hytes.com/hytes/docs/viewcode.asp?id=18&lid=3684
Thanks
Narsu
----- 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
> Hello everyone. I'm in the process of attemping to
> translate some xml into a table in html. That in
> itself is easy enough, but catch is I want to
> alternate the row colors. So given a general XML
> document like:
>
> <row>
> <column1>Column Data</column1>
> <column2>Column Data</column2>
> <column3>Column Data</column3>
> </row>
> <row>
> <column1>Column Data</column1>
> <column2>Column Data</column2>
> <column3>Column Data</column3>
> </row>
> <row>
> <column1>Column Data</column1>
> <column2>Column Data</column2>
> <column3>Column Data</column3>
> </row>
>
> I want end up with some html like:
>
> <tr bgcolor='color1'>
> <td>Column Data</td>
> <td>Column Data</td>
> <td>Column Data</td>
> </tr>
> <tr bgcolor='color2'>
> <td>Column Data</td>
> <td>Column Data</td>
> <td>Column Data</td>
> </tr>
> <tr bgcolor='color1'>
> <td>Column Data</td>
> <td>Column Data</td>
> <td>Column Data</td>
> </tr>
>
> 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
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list