If I understand you correctly, you want to use a different style background
color for alternating rows in a table, correct?
If so, something like the following will work:
<table class="spec_item_table">
<xsl:for-each select="specifications/row">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<tr class="spec_item_even">
</xsl:when>
<xsl

therwise>
<tr class="spec_item_odd">
</xsl

therwise>
</xsl:choose>
<td>
<xsl:value-of select="heading"></xsl:value-of>
</td>
<td>
<xsl:value-of select="data"></xsl:value-of>
</td>
</tr>
</xsl:for-each>
</table>
--
HTH,
Kevin Spencer
Microsoft MVP
Chicken Salad Surgery
What You Seek Is What You Get.
"gauravkg via DotNetMonster.com" <u25584@uwe> wrote in message
news:65fc42ecd19e0@uwe...
> Thanks to allof u how have given pain to see my problem
> i have an xml file having this tructure
>
> <specifications>
> <row>
> <heading>MegaPixels(Effective)</heading>
> <data>6.0</data>
> </row>
> <row>
> <heading>MegaPixels(Total)</heading>
> <data>6.2</data>
> </row>
> </specifications>
>
> the xslt file is this
> <table class="spec_item_table">
>
> <xsl:for-each select="specifications/row">
> <tr class="spec_item_odd">
> <td>
> <xsl:value-of select="heading"></xsl:value-of>
> </td>
> <td>
> <xsl:value-of select="data"></xsl:value-of>
> </td>
> </tr>
> </xsl:for-each>
> </table>
>
>
> my problem is that for each row it should show different colors like
> row1:grey color
> row2.yellow
>
> for that i used
> <tr class="spec_item_odd">
>
> bit it will have same for all the rows so i can achive this in xml
> .thanks
> in advance
>
> --
> Message posted via DotNetMonster.com
> http://www.dotnetmonster.com/Uwe/For...p-net/200609/1
>