You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Daniel Müller <da...@hotmail.com> on 2003/06/13 00:07:11 UTC
alternate row color
Hi there
I would like to alternate the row color in a table. If I set the row color
in a variable like this:
<....background-color="$myColor" ...>
I get an error from Fop: invalid Character....
Is it not allowed to use variables for the background-color?
How do you alternate the row color in a table?
Greetings
Daniel
_________________________________________________________________
MSN - More useful every day http://www.msn.de
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: alternate row color
Posted by Clay Leeds <cl...@medata.com>.
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">
 <xsl:value-of select="ICD9DESC"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org