J
John Kooistra
Hi,
I'm trying to set the font colour and background colour in HTML based
on an XSL condition a la:
<xsl:variable name="font">
<xsl:choose>
<xsl:when test="SOME TEST">
<fontcolour>Red</fontcolour>
<bgcolour>Blue</bgcolour>
</xsl:when>
<xsltherwise>
<fontcolour>Black</fontcolour>
<bgcolour>White</bgcolour>
</xsltherwise>
</xsl:choose>
</xsl:variable>
<td bgcolor="{$font/bgcolour}">
<font color="{$font/fontcolour}">
TEXT
</font>
</td>
However, I get the error: "Reference to variable or parameter 'font'
must evaluate to a node list."
I get it because $font is a Result Tree Fragment.
Is there a way to get the functionality I want without using a
processor dependent function like msxsl:node-set(rtf)?
As a work-around, I'm currently using two separate variables for
fontcolour and bgcolour complete with their own condition statements.
Obviously, it is very ugly and I would really appreciate any
suggestions you have.
Thanks a million,
John
I'm trying to set the font colour and background colour in HTML based
on an XSL condition a la:
<xsl:variable name="font">
<xsl:choose>
<xsl:when test="SOME TEST">
<fontcolour>Red</fontcolour>
<bgcolour>Blue</bgcolour>
</xsl:when>
<xsltherwise>
<fontcolour>Black</fontcolour>
<bgcolour>White</bgcolour>
</xsltherwise>
</xsl:choose>
</xsl:variable>
<td bgcolor="{$font/bgcolour}">
<font color="{$font/fontcolour}">
TEXT
</font>
</td>
However, I get the error: "Reference to variable or parameter 'font'
must evaluate to a node list."
I get it because $font is a Result Tree Fragment.
Is there a way to get the functionality I want without using a
processor dependent function like msxsl:node-set(rtf)?
As a work-around, I'm currently using two separate variables for
fontcolour and bgcolour complete with their own condition statements.
Obviously, it is very ugly and I would really appreciate any
suggestions you have.
Thanks a million,
John