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

Re: Different Colors for Alternating Rows

Subject: Re: Different Colors for Alternating Rows
From: Kevin Jones <kjones@xxxxxxxxxxx>
Date: Tue, 1 Jul 2003 21:29:16 +0100
colors jones
That is very odd. It works for me and obviously for Americo as well.

The xsl:when line should look like this, note the quotes around true. This is 
a string comparsion.

	<xsl:when test="$even='true' "> 

If this is how you have it can you send me a copy of your XSL and XML and I 
will have a look through it. Perhaps better to just email me this directly  
to avoid wasting bandwidth.

Kev.

On Tuesday 01 July 2003 20:43, Schwartz, Rechell R, ALABS wrote:
> Kevin,
> Americo,
>
> Thanks, but it still shows every row with "oddStyle" even with the
> corrected code.
>
> Rechell
>
> -----Original Message-----
> From: Kevin Jones [mailto:kjones@xxxxxxxxxxx]
> Sent: Tuesday, July 01, 2003 3:20 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: melinor@xxxxxxx; Schwartz, Rechell R, ALABS
> Subject: Re:  Different Colors for Alternating Rows
>
> On Tuesday 01 July 2003 18:42, Americo Albuquerque wrote:
> > > Kevin,
> > >
> > > This time I didn't get the error and the performance was
> > > excellent (only about 6 seconds), BUT every row came out with
> > > the oddStyle. Any clue what is wrong?
> >
> > In your <xsl:template name='copytr'> change <xsl:when
>
> test="$even=true()">
>
> > to <xsl:when test="$even='true'"> and it might work (just in case you
> > missed the line I'm writing the complete template in the end of this
>
> email)
>
> > That happens because $even is bound to the value of a string attribute
>
> and
>
> > here you are comparing its value with true, so the result will always
>
> be
>
> > false and you'll get all oddStyle.
>
> Americo, thanks for pointing out the error. Should learn to check code
> before
> hacking changes in at the last minute.
>
> Rechell, the 6 seconds actually sounds a bit slow. I clocked it at just
> under
> 1 sec on a 2.4GHz Linux setup with 6000 entries. This may indicate some
> configuration problems or it may just be due to differences in input
> data
> and/or hardware/software. Not sure if you need any better than this but
> I
> think I mentioned the DVC equivalent is slightly quicker, 10-20% or so.
>
> Kev.
>
>
>  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

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.