I have a
customisation to format the footnotes (both
the footnote mark and the text) in formal tables and informal
tables. For an informal
table, the footnote mark is only generated within a table cell –
the mark is not
being generated below the table, but the footnote text appears
there. In formal
tables, the footnotes are correctly generated with a footnote
mark. Here is the
fo output from each table to compare – the fo:inline coding is
missing from the
informaltable:
Example
from a formal table:
<fo:block xmlns:xi="http://www.w3.org/2001/XInclude"
keep-with-previous.within-column="always"><fo:block font-family="sans-serif"
font-size="8pt" font-weight="normal" font-style="normal"
space-before="0mm" text-align="left" color="#000000"
start-indent="0mm"
><fo:block xmlns:xlink="http://www.w3.org/1999/xlink"><fo:inline
font-family="sans-serif" font-size="75%"
font-weight="normal"
font-style="normal"
baseline-shift="super">a </fo:inline>Water
is
sourced
from groundwater aquifers within the Port Hedland
SWMA</fo:block></fo:block></fo:block>
Example
from an informaltable:
<fo:block xmlns:xi="http://www.w3.org/2001/XInclude"
keep-with-previous.within-column="always"><fo:block
font-family="sans-serif"
font-size="8pt" font-weight="normal"
font-style="normal"
space-before="0mm" text-align="left"
color="#000000" start-indent="0mm"><fo:block
xmlns:xlink="http://www.w3.org/1999/xlink">see examples in
<fo:inline font-style="italic">Water Act 1989
Permissible
Consumptive Volume Groundwater Order July 2008</fo:inline>,
Victoria Government Gazette, 3 July 2008, p
1591</fo:block></fo:block></fo:block>
I’ve rechecked all possible coding – here are
my
customisations (Maybe the problem is in template
format.footnote.mark because that is the only relevant template I
can see generating fo:inline, but I
don’t see how because formal table footnotes generate OK):
<xsl:template match="d:footnote">
<xsl:choose>
<xsl:when test="ancestor::d:table or ancestor::d:informaltable">
<xsl:call-template name="format.footnote.mark">
<xsl:with-param name="mark">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$footnotealign != '0'">
<fo:footnote>
<fo:inline>
<xsl:call-template name="format.footnote.mark">
<xsl:with-param name="mark">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:with-param>
</xsl:call-template>
</fo:inline>
<fo:footnote-body xsl:use-attribute-sets="footnote.properties">
<fo:list-block
space-after="{$leadingafterpagefootnote}"> <!--space-before: leading between
each footnote (default: 3pt) ****works 19/10/11-->
<fo:list-item>
<fo:list-item-label
end-indent="label-end()">
<fo:block>
<xsl:choose>
<xsl:when test="$footnotemarkbig
!=
'0'">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="format.footnote.mark">
<xsl:with-param name="mark">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:list-item-label> <!--retain fo:list-item-label; no
edit-->
<fo:list-item-body
start-indent="{$pagefootnotetextleftmargin}"> <!--left margin
indent for footnote text *****works 20/10/11-->
<xsl:apply-templates/>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:when>
<xsl:otherwise>
<fo:footnote>
<fo:inline>
<xsl:call-template name="format.footnote.mark">
<xsl:with-param name="mark">
<xsl:apply-templates select="." mode="footnote.number"/>
</xsl:with-param>
</xsl:call-template>
</fo:inline>
<fo:footnote-body xsl:use-attribute-sets="footnote.properties">
<xsl:apply-templates/>
</fo:footnote-body>
</fo:footnote>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<xsl:choose>
<xsl:when test="ancestor::d:table or ancestor::d:informaltable">
<fo:inline xsl:use-attribute-sets="table.footnote.mark.properties">
<xsl:choose>
<xsl:when test="$fop.extensions !=
0">
<xsl:attribute name="vertical-align">super</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="baseline-shift">super</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:copy-of select="$mark"/>
<xsl:text> </xsl:text> <!--single
space between footnote
symbol and
text
below
table *****works 27/9/11-->
</fo:inline>
</xsl:when>
<xsl:otherwise>
<fo:inline xsl:use-attribute-sets="footnote.mark.properties">
<xsl:choose>
<xsl:when test="$fop.extensions !=
0">
<xsl:attribute name="vertical-align">super</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="baseline-shift">super</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="d:footnote" mode="footnote.number">
<xsl:choose>
<xsl:when test="string-length(@label) != 0">
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:when test="ancestor::d:table or ancestor::d:informaltable">
<xsl:variable name="tfnum">
<xsl:number level="any" from="d:table|d:informaltable" format="1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="string-length($tables.footnote.number.symbols)
>=
$tfnum"><!--tables.footnote.number.symbols-->
<xsl:value-of select="substring($tables.footnote.number.symbols,
$tfnum,
1)"/><!--tables.footnote.number.symbols-->
</xsl:when>
<xsl:otherwise>
<xsl:number level="any" from="d:table|d:informaltable"
format="{$tables.footnote.number.format}"/><!--tables.footnote.number.symbols-->
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="fnum">
<!--
* Determine the footnote number to display for this footnote,
-->
<!--
* by counting all foonotes, ulinks, and any elements that have
-->
<!--
* an xlink:href attribute that meets the following criteria:
-->
<!--
* -->
<!--
* - the content of the element is not a URI that is the same
-->
<!--
* URI as the value of
the href
attribute -->
<!--
* - the href attribute is not an internal ID reference (does
-->
<!--
* not start with a hash
sign) -->
<!--
* - the href is not part of an olink reference (the element
-->
<!--
* - does not have an xlink:role attribute that indicates it is
-->
<!--
* an olink, and the hrf
does not
contain a hash sign) -->
<!--
* - the element either has no xlink:type attribute or has -->
<!--
* an xlink:type
attribute whose value
is 'simple' -->
<!--
* -->
<!--
* Note that hyperlinks are counted only if both the value of
-->
<!--
* ulink.footnotes is non-zero and the value of ulink.show is
-->
<!--
* non-zero -->
<!--
FIXME: list in @from is probably not complete -->
<xsl:number level="any"
from="d:chapter|d:appendix|d:preface|d:article|d:refentry|d:bibliography"
count="d:footnote[not(@label)][not(ancestor::d:table)
and
not(ancestor::d:informaltable)]
|d:ulink[$ulink.footnotes != 0][node()][@url !=
.][not(ancestor::d:footnote)][$ulink.show != 0]
|*[node()][@xlink:href][not(@xlink:href
=
"">
[not(contains(@xlink:href,'#') and @xlink:role =
$xolink.role)]
[not(@xlink:type) or @xlink:type='simple']
[not(ancestor::d:footnote)][$ulink.footnotes !=
0][$ulink.show != 0]
"
format="1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="string-length($footnote.number.symbols)
>=
$fnum">
<xsl:value-of select="substring($footnote.number.symbols,
$fnum,
1)"/>
</xsl:when>
<xsl:otherwise>
<xsl:number value="$fnum" format="{$footnote.number.format}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:attribute-set name="table.footnote.mark.properties"> <!-- ******works
27/9/11-->
<xsl:attribute name="font-family">
<xsl:value-of select="$graphictypeface"/>
</xsl:attribute> <!--
OPTIONS: $body.fontset,
$graphictypeface *****works
27/9/11-->
<xsl:attribute name="font-size">
<xsl:value-of select="$cellfootnotefontsize"/>
</xsl:attribute> <!--font
size as a
percentage
of
surrounding text (default: 75%). OPTION: specify a point
size-->
<xsl:attribute name="font-weight">
<xsl:value-of select="$cellfootnotefontweight"/>
</xsl:attribute> <!--
OPTIONS: normal, bold
*****works 27/9/11-->
<xsl:attribute name="font-style">
<xsl:value-of select="$cellfootnotefontstyle"/>
</xsl:attribute> <!--
OPTIONS: normal, italic
*****works 27/9/11-->
</xsl:attribute-set>
--
Dave Gardiner