<xsl:template match="simplelist">
<!-- with no type specified, the default is 'vert' -->
<fo:table xsl:use-attribute-sets="normal.para.spacing">
+ <xsl:call-template name="simplelist.table.columns">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
<fo:table-body>
<xsl:call-template name="simplelist.vert">
<xsl:with-param name="cols">
<xsl:template match="simplelist[@type='horiz']">
<fo:table xsl:use-attribute-sets="normal.para.spacing">
+ <xsl:call-template name="simplelist.table.columns">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
<fo:table-body>
<xsl:call-template name="simplelist.horiz">
<xsl:with-param name="cols">
<xsl:template match="simplelist[@type='vert']">
<fo:table xsl:use-attribute-sets="normal.para.spacing">
+ <xsl:call-template name="simplelist.table.columns">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
<fo:table-body>
<xsl:call-template name="simplelist.vert">
<xsl:with-param name="cols">
</fo:table>
</xsl:template>
+<xsl:template name="simplelist.table.columns">
+ <xsl:param name="cols" select="1"/>
+ <xsl:param name="curcol" select="1"/>
+ <fo:table-column column-number="{$curcol}"/>
+ <xsl:if test="$curcol < $cols">
+ <xsl:call-template name="simplelist.table.columns">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="curcol" select="$curcol + 1"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
<xsl:template name="simplelist.horiz">
<xsl:param name="cols">1</xsl:param>
<xsl:param name="cell">1</xsl:param>
<xsl:template match="segmentedlist" mode="seglist-table">
<xsl:apply-templates select="title" mode="list.title.mode" />
<fo:table>
+ <fo:table-column column-number="1"/>
+ <fo:table-column column-number="2"/>
<fo:table-header>
<fo:table-row>
<xsl:apply-templates select="segtitle" mode="seglist-table"/>