<xsl:template name="inherited.table.attribute">
<xsl:param name="entry" select="."/>
+ <xsl:param name="tgroup" select="$entry/ancestor::tgroup[1]"/>
<xsl:param name="colnum" select="0"/>
<xsl:param name="attribute" select="'colsep'"/>
<xsl:if test="$entry/@spanname">
<xsl:variable name="spanname" select="$entry/@spanname"/>
<xsl:variable name="spanspec"
- select="$entry/ancestor::tgroup/spanspec[@spanname=$spanname]"/>
+ select="$tgroup/spanspec[@spanname=$spanname]"/>
<xsl:variable name="span.colspec"
- select="$entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]"/>
+ select="$tgroup/colspec[@colname=$spanspec/@namest]"/>
<xsl:variable name="spanspec.value">
<xsl:call-template name="get-attribute">
<xsl:if test="$entry/@namest">
<xsl:variable name="namest" select="$entry/@namest"/>
<xsl:variable name="colspec"
- select="$entry/ancestor::tgroup/colspec[@colname=$namest]"/>
+ select="$tgroup/colspec[@colname=$namest]"/>
<xsl:variable name="namest.value">
<xsl:call-template name="get-attribute">
<xsl:variable name="tgroup.value">
<xsl:call-template name="get-attribute">
- <xsl:with-param name="element" select="$entry/ancestor::tgroup[1]"/>
+ <xsl:with-param name="element" select="$tgroup"/>
<xsl:with-param name="attribute" select="$attribute"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$tgroup.value"/>
</xsl:when>
<xsl:when test="$attribute = 'rowsep'">
- <xsl:if test="$entry/ancestor::tgroup[1]/parent::*/@frame = 'all'">
+ <xsl:if test="$tgroup/parent::*/@frame = 'all'">
<xsl:value-of select="1"/>
</xsl:if>
</xsl:when>
<xsl:when test="$attribute = 'colsep'">
- <xsl:if test="$entry/ancestor::tgroup[1]/parent::*/@frame = 'all'">
+ <xsl:if test="$tgroup/parent::*/@frame = 'all'">
<xsl:value-of select="1"/>
</xsl:if>
</xsl:when>
<xsl:template name="empty.table.cell">
<xsl:param name="colnum" select="0"/>
- <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/>
-
<xsl:variable name="rowsep">
<xsl:call-template name="inherited.table.attribute">
<xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="tgroup" select="ancestor::tgroup"/>
<xsl:with-param name="colnum" select="$colnum"/>
<xsl:with-param name="attribute" select="'rowsep'"/>
</xsl:call-template>
<xsl:variable name="colsep">
<xsl:call-template name="inherited.table.attribute">
<xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="tgroup" select="ancestor::tgroup"/>
<xsl:with-param name="colnum" select="$colnum"/>
<xsl:with-param name="attribute" select="'colsep'"/>
</xsl:call-template>
</xsl:call-template>
</xsl:if>
- <fo:block/> <!-- fo:table-cell should not be empty -->
+ <!-- fo:table-cell should not be empty -->
+ <fo:block/>
</fo:table-cell>
</xsl:template>
<xsl:variable name="rowsep">
<xsl:call-template name="inherited.table.attribute">
<xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="tgroup" select="ancestor::tgroup"/>
<xsl:with-param name="colnum" select="$colnum"/>
<xsl:with-param name="attribute" select="'rowsep'"/>
</xsl:call-template>
<xsl:variable name="colsep">
<xsl:call-template name="inherited.table.attribute">
<xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="tgroup" select="ancestor::tgroup"/>
<xsl:with-param name="colnum" select="$colnum"/>
<xsl:with-param name="attribute" select="'colsep'"/>
</xsl:call-template>