Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Problem with conditional colors [Thread Next] Re: Problem with conditional colorsTo: NULL Date: 12/6/2004 3:09:00 PM I've sort of figured out what's going on.
The way that I was determining what the XSL results were was by viewing
the page in Internet Explorer and copying the generated HTML into
DevStudio.
To get a better idea, I wrote my own XSL converter using .NET to see
what was actually being generated. (I know I could have downloaded one,
but I'm going for the learning experience here :-) )
Anyway, if I defined the variable like this:
<xsl:when test="state = "Assigned"">
#FF0000
</xsl:when>
Then <tr bgcolor={$rowcolor}"
would come out like this:
</tr>
<tr bgcolor="
#FF0000
" >
Internet Explorer would somehow misinterpret this value.
Take away the line feeds in the variable declaration:
<xsl:when test="state =
"Assigned"">#FF0000</xsl:when>
And everything works fine.
So the lesson I learnt there is: Line feeds are significant.
As an aside, I'm curious as to whether this should be considered a
defect in Internet Explorer or not.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
