xsl-list
[Top] [All Lists]

Alternate row color

2003-01-10 13:30:56
Hello all,
I have xml and xsl file.
This is XML
<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl'
href='barcodeFamily.xsl'?>
<Data>
        <data1>
                <info1>
                        <clnum>1234567</clnum>
                        <clname>dumy, dumies</clname>
                        <ssn>123456789 </ssn>
                        <rel_desc>Child    </rel_desc>
                </info1>
        </data1>
        <data1>
                <info1>
                        <clnum>7654321</clnum>
                        <clname>miky, mikies </clname>
                        <ssn>987654321 </ssn>
                        <rel_desc>Child    </rel_desc>
                </info1>
        </data1>
</Data>

This is XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
        <xsl:template match="/">
                        <html>
                                <body>
                                        <b><xsl:apply-templates/></b>
                                </body>
                </html>
        </xsl:template>
        <xsl:template match="data">
                        <p>
                        <center>
                        <table>
                                <tr>
                                        <th>Client Number</th>
                                        <th>Client Name</th>
                                        <th>Client SSN</th>
                                        <th>Relationship Description</th>
                                </tr>
                                <xsl:apply-templates/>
                        </table>
                        </center>
                        </p>
        </xsl:template>

        <xsl:template match="data1">
                <tr>
                        <td>
                                        <xsl:value-of select="clnum"/>
                        </td>
                        <td>
                                        <xsl:value-of select="clname"/>
                        </td>
                        <td>
                                        <xsl:value-of select="ssn"/>
                        </td>
                        <td>
                                        <xsl:value-of select="rel_desc"/>
                        </td>
                </tr>
        </xsl:template>
</xsl:stylesheet>

I can't make it has the alternation row color on the
display.  So please help me to do this.
THANKS FOR YOUR HELPS!


=====
"It is essential to know that to be a happy person, a happy family, a happy 
society, it is very crucial to have a good heart, that is very crucial,"
Dalai Lama

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>