Apply patch from Kai Runte.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
evenisse
2003-03-07 13:33:43 +00:00
parent 305dafa323
commit 393a11a449

View File

@@ -270,22 +270,34 @@
</xsl:template>
<xsl:template match="table">
<!-- FIXME: Do Nothing is not acceptable -->
<!-- realistically, FOP doesn't support tables with auto, so we can
short term, count the number of td's or th's in the first row
and use that as a guide for an evenly spaced table
<fo:table>
<fo:table-column column-width="1cm"/>
<fo:table-column column-width="13cm"/>
<fo:table-column column-width="1cm"/>
<fo:table-body>
<xsl:apply-templates mode="toc"/>
</fo:table-body>
</fo:table>
-->
<fo:table>
<xsl:for-each select="tr[last()]/td">
<fo:table-column/>
</xsl:for-each>
<fo:table-body>
<xsl:for-each select="tr">
<xsl:if test="th">
<!-- FOP doesn't like the table-header, hence a basic table-row -->
<fo:table-row>
<xsl:apply-templates/>
</fo:table-row>
</xsl:if>
<xsl:if test="td">
<xsl:if test="(position() mod 2)=0">
<fo:table-row background-color="#efefef" color="#000">
<xsl:apply-templates/>
</fo:table-row>
</xsl:if>
<xsl:if test="(position() mod 2)=1">
<fo:table-row background-color="#ddd" color="#000">
<xsl:apply-templates/>
</fo:table-row>
</xsl:if>
</xsl:if>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:template>
<!-- XHTML stuff -->