[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Background color in table

Subject: RE: Background color in table
From: Andreas Byström <andreas.bystrom@xxxxxxxxxxxx>
Date: Tue, 27 May 2003 16:04:56 +0200
andreas bystr m
Thanks, this solved this


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Bryan Archer
Sent: den 27 maj 2003 14:51
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Background color in table

Use the position() function.

<xsl:template match="/">
    <xsl:for-each select="root/pack/service" >
        <td bgcolor="#FFFFFF">
          <xsl:if test="position() mod 2 = 1">
            <xsl:attribute name="bgcolor">#000000</xsl:attribute>
          <xsl:value-of select="name" />


-----Original Message-----
From: Andreas Byström [mailto:andreas.bystrom@xxxxxxxxxxxx]
Sent: 27 May 2003 13:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Background color in table

Hi all!

I'm about to make web page that should have a table of names in it. I would
like to have different background color on each other ro in the table,

I have trouble getting this to work with the XSL. This is an example on the
xml I have to work with

I want to list all services names. I managed to solve it when I only had one
<pack> tag, but now I can have several pack-tags. Does someone know how to
get a nice table from this data?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
Visit our website at http://www.rm.com

This message is confidential.  You should not copy it
or disclose its contents to anyone.  You may use and apply the information
only for the intended purpose.  Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message.  Any views or opinions presented are only those of the author and
not those of RM.  If this email has come to you in error please delete it
and any attachments.  Please note that RM may intercept incoming and
outgoing e-mail communications.

This email has been scanned for viruses by Trend ScanMail.

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

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.