cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: change xsl variable value
Date Wed, 22 Nov 2000 18:52:41 GMT
Variables in XSLT are static, you cannot change them.

-matt

On Wed, Nov 22, 2000 at 05:54:38PM +0100, Chappuis J.-Vincent wrote:
> Hi all, I need help about changing an xsl variable value
> 
> Problem : 
> I would like to make a list screen. There are a lot of data and I would to put one line
in a color and the other in an other color and so on...
> 
> I make like that :
> 
>   [...]
> <xsl:variable name="colored" select="0"/>
> <xsl:for-each select="ResultListScreen/FACompany">
> <xsl:choose>
>   <xsl:when test='$colored = "0"'>
>     <tr bgcolor = "#EEEEFF">
>     [...]
>     </tr>
>     <xsl:variable name="colored" select="1"/>
>   </xsl:when>
>   <xsl:otherwise>
>     <tr>
>     [...]
>     </tr>
>     <xsl:variable name="colored" select="0"/>
>   </xsl:otherwise>
> </xsl:choose>
> </xsl:for-each>
> [...]
> 
> but, it doesn't work --> always the same color !
> I tried with and editor (Excelon Stylus) and It works but not with cocoon.
> 
> So I think that the colored variable is always at "0" and not reinitialised.
> 
> Any idea ?
> 
> Thanks
>     
> 
> 
> 

Mime
View raw message