|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: counter in xsl
You can't, but this is how you can implement alternating row color (as
this is how I do it). In your for-each, do this...
<xsl:for-each ... >
<tr class="row{position() mod 2}">
...
</tr>
</xsl:for-each>
Now, each odd row is class="row1" and each even row is class=row0". The
only this left to do is define these classes in a CSS style block or
sheet, like so:
<style>
.row1 { background-color:green; color:white }
.row0 { background-color:white; color:black }
</style>
The { and } work almost like an eval statement would (almost). :)
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> thenewmatrix@xxxxxxxx
> Sent: Friday, February 08, 2002 4:35 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: counter in xsl
>
>
> How can i create a counter into xsl due to insert alternate
> color in table-row???
>
> Thanks.
>
> Connettiti con Genie.it e vinci una fantastica Mini! E'
> facile clicca qui http://www.genie.it/geniemini
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








