On 6/12/2003 3:07 PM, Daniel M�ller wrote:
How do you alternate the row color in a table?

Daniel

You cannot use a variable like that. You have to set the color using xsl:attribute as shown below, where I switch off between white (#ffffff) and an ugly orange (#e3ceb9) color:


<fo:table-row>
<xsl:attribute name="background-color"><xsl:choose><xsl:when test="(position() mod 2) = 0">#e3ceb9</xsl:when><xsl:otherwise>#ffffff</xsl:otherwise></xsl:choose></xsl:attribute>
<fo:table-cell padding="1pt">
<fo:block>
<xsl:value-of select="ICD9"/>
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1pt">
<fo:block padding-left="5pt">
&#160;<xsl:value-of select="ICD9DESC"/>
</fo:block>
</fo:table-cell>
</fo:table-row>


--
Clay Leeds - [EMAIL PROTECTED]
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to