xsl-list
[Top] [All Lists]

RE: Re: <xsl:choose> or variable syntax incorrect?

2003-09-26 13:07:19
[ Kathy Burke]

Tom, not meaning to make this "hard"...really...was simply 
looking for an
example of accomplishing an <xsl:choose> condition to return 
a result, based
on the 'name' attribute of an element. I did mention that I'm 
not getting an
error now, just that my <xsl:when> result skips to the <xsl:otherwise>
section regardless of what's in my xml file.

Thanks for your example. Using the $rowcolor variable is SO 
MUCH SIMPLER
than what I was trying to do. But my result is still that all 
rows are blue
even though one of the three should be red because they have <Board>
elements.


I tested it on a document with two station elements, one with no child
board elements and one with two board elements, copied from your post.
The colors were red and navy for the two rows.  So it worked as expected
when I tested it.  There must be something different about what you are
working with than you are describing.

Did your last attempt produce the html that you were expecting?  Look at
the html source, not just the browser display.  If it did, you need to
redesign the html.  If it did not, that will be a good place to start -
and to tell us what is going on.

So - you need to show us the simplest possible source example that you
can (covering each alternative row color), the output you expect to get,
the stylesheet that produced your results, and where those results are
wrong.

Cheers,

Tom P

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