Hi,
I have one more doubt in XSL if any one can help i would be thankful to you.Its like i have a table called transaction and the XML for that perticular table is as given:
<Transaction>
<TransactionDate>10/02/1999</TransactionDate>
<TransactionDescription>Interest paid</TransactionDescription>
<Sequence>Transaction Sequence Number</Sequence>
<Amount>50.00</Amount>
<Balance>2000.00</Balance>
</Transaction>
so for this table i want the xsl insuch a way that the alternate rows bgcolors should be diff like if even No: rows are blue in color i want the odd No: rows to be in yellow color so iam doing it using the position method but it is not working and my XSL goes like this:
<xsl:template match="Transaction">
<xsl:variable name="var">
<xsl:choose>
<xsl:when test=" position( ) mod 2 = 0">bgcolor=#FF6600</xsl:when>
<xsl

therwise>bgcolor=#FFFFFF</xsl

therwise>
</xsl:choose>
</xsl:variable>
<tr valign="top">
<xsl:attribute name="bgcolor"><xsl:value-of select="$var"/></xsl:attribute>
<td width="23%" align="center">
<xsl:value-of select="TransactionDate"/>
</td>
<td width="23%" align="center">
<xsl:value-of select="TransactionDescription"/>
</td>
<td width="23%" align="center">
<xsl:value-of select="Amount"/>
</td>
<td width="23%" align="center">
<xsl:value-of select="Balance"/>
</td>
<td width="40%">
<table border="0" cellspacing="1" cellpadding="1" width="677">
<tr>
<td width="103" height="21" bgcolor="#FFFFFF">
<xsl:value-of select="TransactionDate"/>
<font size="2" face="arial" color="#003366">
<xsl:value-of select="TransactionDate"/>
<xsl:text disable-output-escaping="yes"> </xsl:text>
</font>
</td>
<td width="322" height="21" bgcolor="#FFFFFF">
<font size="2" face="arial" color="#003366">
<xsl:value-of select="TransactionDescription"/>
</font>
</td>
<td width="98" height="21" bgcolor="#FFFFFF">
<font size="2" face="arial" color="#003366">
<xsl:value-of select="Amount"/>
</font>
</td>
<td width="101" height="21" bgcolor="#FFFFFF">
<font size="2" face="arial" color="#003366">
<xsl:value-of select="Balance"/>
</font>
</td>
</tr>
<!--</xsl:for-each>-->
</table>
</td>
</tr>
</xsl:template>
So if possible can anyone tell how it can be achieved and i will be very thankful for that.Anyway thanks in advance.
Regards,
Rajitha.