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

Re: Alternate color regardless from groups

Subject: Re: Alternate color regardless from groups
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Mon, 04 Feb 2002 18:12:27 +0100
alternate color
Hi Robert,

I'm not sure, but I think you can use the preceding-sibling-axis. There can always be a performance problem, if the file is to big.

<xsl:if test="count(preceding-sibling::row) mod 2 = 0">
    ...
</xsl:if>

Regards,

Joerg

          <xsl:if test="(position() mod 2) = '0' ">
               <xsl:attribute name="background-color">
                    <xsl:value-of select="$row_color_gray"/>
               </xsl:attribute>
          </xsl:if>

this doesn't work properly, becouse position() begin at 1 for each group,
so I
get sometimes the same color for the last row of a group and the first one
of the next group.

thanks,

Robert.


--

System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@xxxxxxxxx
www.virbus.de


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.