<xsl:value-of select="$man.table.title.font"/>
<xsl:text> </xsl:text>
<xsl:if test="self::htmltable">
- <xsl:for-each select="ancestor-or-self::*">
- <xsl:message><xsl:value-of select="@*"/></xsl:message>
- </xsl:for-each>
</xsl:if>
<xsl:if test="parent::td|self::htmltable[@parent = 'td']">
<xsl:text>*[nested table]</xsl:text>
align="{@align}">
<xsl:choose>
<xsl:when test=".//tr">
- <xsl:message>Warn: Extracted a nested table. (No nesting support in tbl(1).)</xsl:message>
+ <xsl:message
+ >Warn: Extracted a nested table. [tbl(1) does not support nesting]</xsl:message>
<xsl:text>[nested table]* </xsl:text>
</xsl:when>
<xsl:otherwise>
</xsl:if>
</xsl:template>
- <!-- * Not sure what if anything to do with colgroup -->
- <xsl:template match="colgroup"/>
- <xsl:template match="col"/>
+ <!-- * ============================================================== -->
+ <!-- * Handle table footnotes -->
+ <!-- * ============================================================== -->
+ <xsl:template match="footnote" mode="table.footnote.mode">
+ <xsl:variable name="footnotes" select=".//footnote"/>
+ <xsl:variable name="table.footnotes"
+ select=".//tgroup//footnote"/>
+ <xsl:value-of select="$man.table.footnotes.separator.line"/>
+ <xsl:text> </xsl:text>
+ <xsl:text>.br </xsl:text>
+ <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
+ <xsl:apply-templates select="*[position() > 1]"/>
+ </xsl:template>
- <!-- * The following templates are needed for dealing with -->
- <!-- * table-footnote markup generated by the HTML stylesheets. -->
- <xsl:template match="div">
- <xsl:apply-templates/>
+ <!-- * The following template for footnote.body.number mode was just -->
+ <!-- * lifted from the HTML stylesheets with some minor adjustments -->
+ <xsl:template match="*" mode="footnote.body.number">
+ <xsl:variable name="name">
+ <xsl:text>ftn.</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="footnote.mark">
+ <xsl:text>[</xsl:text>
+ <xsl:apply-templates select="ancestor::footnote"
+ mode="footnote.number"/>
+ <xsl:text>] </xsl:text>
+ </xsl:variable>
+ <xsl:variable name="html">
+ <xsl:apply-templates select="."/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
+ <xsl:choose>
+ <xsl:when test="$html-nodes//p">
+ <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
+ <xsl:with-param name="mark" select="$footnote.mark"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
+ <xsl:with-param name="mark" select="$footnote.mark"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$html"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
- <xsl:template match="sup">
+
+ <!-- * The HTML stylesheets output <sup><a>...</a></sup> around -->
+ <!-- * footnote markers in tables -->
+ <xsl:template match="th/sup">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="a">
<xsl:apply-templates/>
</xsl:template>
+ <!-- * ============================================================== -->
+ <!-- * colgroup and col -->
+ <!-- * ============================================================== -->
+ <!-- * Not sure what if anything to do with colgroup... -->
+ <xsl:template match="colgroup"/>
+ <xsl:template match="col"/>
+
</xsl:stylesheet>