|
Subject: [xsl] Alternate color regardless from groups From: Robert_Wittigayer@xxxxxx Date: Mon, 4 Feb 2002 17:46:58 +0100 |
Hi,
I'm grouping a list of rows using the Muenchian technique, and i try to
output the rows with alternate background-color regardless from groups.
i tryed something like :
<xsl:key name="group_by_komp" match="row" use="komp" />
...
...
<xsl:for-each select="row[count(.| key('group_by_komp', komp)[1])=1]">
<xsl:sort select="komp" />
<xsl:for-each select="key('group_by_komp', komp)">
...
...
<xsl:if test="(position() mod 2) = '0' ">
<xsl:attribute name="background-color">
<xsl:value-of select="$row_color_gray"/>
</xsl:attribute>
</xsl:if>
...
...
</xsl:for-each>
</xsl:for-each>
this doesn't work properly, becouse position() begin at 1 for each group,
so I
get sometimes the same color for the last row of a group and the first one
of the next group.
thanks,
Robert.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| FW: [xsl] querystring parameters, Sami, Abdul (Netpros | Thread | Re: [xsl] Alternate color regardles, Joerg Heinicke |
| [xsl] querystring parameters, Aniceto López | Date | Re: [xsl] querystring parameters, Eric Vitiello |
| Month |