|
Subject: Re: [xsl] xsl:if @attribute + xsl:variable not working From: Alessio Mazzieri <mazzieri@xxxxxxxxxxx> Date: Wed, 28 Nov 2001 09:35:01 +0100 |
<xsl:for-each select="area">
<td>
<xsl:attribute name="bgcolor">
<xsl:choose>
<xsl:when test="@position=1">
#FF7A0
</xsl:when>
<xsl:otherwise>
#FF980F
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</td>
</xsl:for-each>Hi all: why if
<xsl:for-each select="area"> <xsl:if test="@position = 1"> <xsl:variable name="color" select="'#FFF7A0'"/> </xsl:if> <xsl:if test="@position = 2"> <xsl:variable name="color" select="'#FF980F"/> </xsl:if>
<td bgcolor="{$color}">dadada asda</td>
</xsl:for-each>
I get this?
"A reference to variable or parameter 'colortabla' cannot be resolved. The variable or parameter may not be defined, or it may not be in scope."
-> the variable IS in scope (if I define it without xsl:if it works) xml -> <area position="1"> or <area position="2">
thanks in advance
Aniceto Lopez
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xsl:if @attribute + xsl:varia, Aniceto Lopez | Thread | RE: [xsl] xsl:if @attribute + xsl:v, Michael Kay |
| [xsl] xsl:if @attribute + xsl:varia, Aniceto Lopez | Date | Re: [xsl] Xalan Error, David Carlisle |
| Month |