Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Problem with conditional colors

From: "Andrew Shepherd" <shepherd_a@-------.--->
To: NULL
Date: 12/6/2004 3:00: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 after the learning experience here :-) )

Anyway, if I defined the variable like this:

<xsl:when test="state = &quot;Assigned&quot;">
#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 =
&quot;Assigned&quot;">#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.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent