This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
variable change in xsl:for-each
- From: inchi2000 at gmx dot de
- To: XSL-List at lists dot mulberrytech dot com
- Date: Mon, 22 Jul 2002 18:05:54 +0200 (MEST)
- Subject: [xsl] variable change in xsl:for-each
- References: <9694.1027353804@www58.gmx.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello,
I want the background to change in each cell. But in every cell I only get
the #FFFFFF-background. I think the variable isn't updated in the
choose-procedure. But I don't know why. Hope you can help.
Thanks!
Markus
Sorry!!! I forget the subject in last mail. So I posted again
heres my xsl-file:
<xsl:variable name="xrowcolor" select="false()"/>
<xsl:variable name="rowcolor">#FFFFFF</xsl:variable>
<xsl:for-each select="//meldungen">
<xsl:choose>
<xsl:when test="$xrowcolor">
<xsl:variable name="rowcolor">#FFFFFF</xsl:variable>
<xsl:variable name="xrowcolor" select="false()"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="rowcolor">#FFFF11</xsl:variable>
<xsl:variable name="xrowcolor" select="true()"/>
</xsl:otherwise>
</xsl:choose>
<fo:table-cell>
<fo:block background-color="{$rowcolor}" font-weight="bold">
<xsl:value-of select="eingang"/>
</fo:block>
</fo:table-cell>
</fo:for-each>
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list