HELP: Alternating Color Question
<xsl:for-each select="row">
<xsl:variable name="row_gvalue" select="col[1]/LabelItem/value"/>
<xsl:variable name="pos" select="position()-1"/>
<xsl:variable name="prow_gvalue" select="../row[$pos]/col[1]/LabelItem/value"/>
<xsl:variable name="create_header" select="$row_gvalue != $prow_gvalue or string-length($prow_gvalue) = 0 and position() > 1 " />
<xsl:variable name="row_index" select="position()"/>
<xsl:if test = "$create_header">
<xsl:variable name="backgroundColor">
... this part is my problem, I want to get the current number of the created header [and will be used as a basis for alternate color]
<xsl:value-of select="$color_alt_light"/>
</xsl:variable>
<tr bgcolor="gray" >
<td colspan="20" height="1"></td>
</tr>
<tr bgcolor="{$backgroundColor}" id="tr_{$row_gvalue}">
<td width="20" height="20" align="center">
&nbsp;<img id="img_{$row_gvalue}" src="img/plus.gif" style="cursor:hand" onclick="displayChildNodes('{$row_gvalue}')" />&nbsp;
</td>
<td colspan="20" class="txt11BoldBlue" style="cursor:hand" onclick="displayChildNodes('{$row_gvalue}')">
<xsl:value-of select="$row_gvalue"/>
</td>
</tr>
</xsl:if>
<tr id="child_{$row_gvalue}" bgcolor="gray" style="display:none" >
<td colspan="20" height="1"></td>
</tr>
<tr id="child_{$row_gvalue}" name="child_{$row_gvalue}" style="display:none" bgcolor="{$color_child_items}">
<td>&nbsp;</td>
<xsl:for-each select="col">
<td align="{@align}" width="{@width}" class="{@css}">
<xsl:apply-templates select="LabelItem"/>
<xsl:apply-templates select="Link"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
|