Chuck Paussa wrote:
> <xsl:for-each select="1 to $numcols"> <!-- xsl 2 structure implemented
in Saxon v7 -->
> <xsl:for-each select="saxon:range(1, $numcols)"> <!-- extension
function -->
> <fo:table-column column-width="10mm"/>
> </xsl:for-each>
(presumably only one of the xsl:for-each elements should be included)
You can also do this in pure XSLT using a recursive named template:
<fo:table table-layout="fixed" width="100%">
<xsl:call-template name="tablecols">
<xsl:with-param name="count" value="$numcols"/>
</xsl:call-template>
...
</fo:table
<xsl:template name="tablecols">
<xsl:param name="count">
<xsl:if test="$count>0">
<fo:table-column/>
<xsl:call-template name="tablecols">
<xsl:with-param name="count" select="$count - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
In FOP 0.20.3, if the table width is fixed (eg. 100%) and no width is specified
for some or all columns, the available width is divided equally between those
columns.
--
Rob Smith