XML, XSL:FO- saving position()
I am writing business forms using XML and XSLT. The idea is to give the form a "green-bar" style.
I have a <xsl:for-each> within a <xsl:for-each> which is a <fo:table> within a <fo:table>
so snippet of the code:
(a bunch of table setup).....
<xsl:for-each select="dc:Detail_line">
<fo:table-row>
<xsl:if test="position() mod 2 != 0">
<xsl:attribute name="background-color">#DDDDDD</xsl:attribute>
</xsl:if>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="background-color">#FFFFFF</xsl:attribute>
</xsl:if>
<fo:table-cell>
<fo:block>
....... (a bunch of table setup) ......
<xsl:for-each select "dc:Quote_Information>
<fo:table-row>
is there a way at this point to remember what the background color of the original row was? It cannot be inherited due to some other stuff I have going on (dealing with borders of the cells - If I inherit the background color, I get a double line between the <fo:table-header> row and the first record in the <fo:table-body>.
Any help would be appreciated.
Thanks.
-mike
|