How to get XSL table with alternating rows highlighted
Rajitha Ereddy
Greenhorn
Joined: Nov 26, 2000
Posts: 20
posted
0
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:
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.
prabhu palanisamy
Greenhorn
Joined: Oct 30, 2000
Posts: 27
posted
0
use xsl:script to get alternate bg colors regards prabhu
Jane Griscti
Ranch Hand
Joined: Aug 30, 2000
Posts: 3141
posted
0
Hi Rajitha, Khun Yee Fung has an example of how to do this in his book XSLT: Working with XML and HTML
It works quite nicely. Hope it helps. ------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform [This message has been edited by Jane Griscti (edited March 09, 2001).]