Поскольку заголовок описывает мою проблему, я хочу сбросить нумерацию сноски в каждом «sect1», а не только в каждой «главе» или «приложении» и т. Д.
Пока я не могудалось сбросить его.Я пытался скопировать часть footnote.xsl в свой слой настройки и изменить его, но он не дал никакого эффекта.
<xsl:template match="footnote" mode="footnote.number">
<xsl:choose>
<xsl:when test="string-length(@label) != 0">
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:when test="ancestor::table or ancestor::informaltable">
<xsl:variable name="tfnum">
<xsl:number level="any" from="table|informaltable" format="1"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum">
<xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
</xsl:when>
<xsl:otherwise>
<xsl:number level="any" from="table|informaltable"
format="{$table.footnote.number.format}"/>
</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="chapter|appendix|preface|article|refentry|bibliography|sect1"
count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]
|ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)][$ulink.show != 0]
|*[node()][@xlink:href][not(@xlink:href = .)][not(starts-with(@xlink:href,'#'))]
[not(contains(@xlink:href,'#') and @xlink:role = $xolink.role)]
[not(@xlink:type) or @xlink:type='simple']
[not(ancestor::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>
Ну, я думаю, это правило для сброса нумерации сносок,Когда я попытался изменить эту часть 'footnote.xsl', она не сработала, и xsltproc возвратился с кучей ошибок.
Примерно так:
Undefined namespace prefix.
1 object left on the stack.