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

Re: two column table with alternating row colors using

Subject: Re: two column table with alternating row colors using xsl xml and css
From: Patrick van Halderen <patrick@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Aug 2003 12:19:40 +0200
xsl row column
On 08-08-2003 11:55, "nicholse@xxxxxxxxxxxxxxxx" <nicholse@xxxxxxxxxxxxxxxx>
wrote:
> <xsl:if test="position() &lt; ceiling(count(../fmp:ROW) div 2)"> this
> gives an error why?

The position() function expects his/her data within the brackets, not after.

> <TD class="r{position() + 1 mod 2}">why cant I use this to alternate the
> row/column data colour?

When you want to insert data into a parameter for an HTML tag, try this:


<td>
<xsl:attribute name="class">
<xsl:value-of select="r{position() + 1 mod 2}" />
</xsl:attribute>

-your info in the cell here-

</td>



Same way for <img>, <a>, and so on.


Patrick


 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.