私はxsl-fo(Saxon XSL 2.0、AHF V6.2)を使ったpdfプリント刊行物を開発しています。Antennahouse Formatterは参照脚注をどのように扱うことができますか?
私の目標は、参照された静的テキスト要素のテキストが挿入された自動番号付き脚注(1ページに重複を除く)を持つことです。
基本的にインライン脚注(fn)は、静的な脚注のテキスト要素を参照し、インライン番号を作成し、脚注テキストをページの下部に印刷します。
<?xml version="1.0" encoding="UTF-8"?>
<document>
<chapter>
<paragraph>some description...</paragraph>
<paragraph>some description with a footnote <fn id="fn2"/></paragraph>
<paragraph>some description with a footnote <fn id="fn2"/></paragraph>
<paragraph>some description...</paragraph>
<paragraph>some description with a footnote <fn id="fn1"/></paragraph>
</chapter>
<!-- this is a wrapper element that will not be displayed in the rendered pdf but only contains the needed information for different footnote texts -->
<chapter class="footnoteWrapper">
<footnote id="fn1">
This is the text body of footnote #1.
</footnote>
<footnote id="fn2">
This is the text body of footnote #2.
</footnote>
<footnote id="fn3">
This is the text body of footnote #3.
</footnote>
</chapter>
</document>
章内の重複するインライン脚注は、それらが指している脚注に従って同じ番号を表示する必要があります。脚注要素:
これは、どのような結果が
...のようになりますが、それはAHFの脚注の拡張とFOでこれらの目標を達成することは可能ですか?
アンテナハウスのフォーマッタエクステンションは、fnカウントに使用すると奇妙な動作をします。彼らは参照されている脚注の正しい現在の番号を参照するのではなく、(1、2、3)を数え続けます。
これは、これまでXSL(単に関連抜粋)である:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="fn[@id = //footnote/@nodeid]"
mode="content"
priority="7">
<!--+ fn link
|
| basic fn (inline) link template.
|
+-->
<xsl:apply-templates select="//footnote[@id = current()/@id]"
mode="content"/>
</xsl:template>
<xsl:template match="footnote"
mode="content"
priority="5">
<!--+ footnote
|
| basic footnote template.
|
+-->
<fo:footnote xsl:use-attribute-sets="fnt.footnote">
<fo:inline baseline-shift="super">
<axf:footnote-number id="fn_{@id}"/>
</fo:inline>
<fo:footnote-body space-after="1mm">
<fo:list-block provisional-distance-between-starts="5mm"
provisional-label-separation="2mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<fo:inline baseline-shift="super">
<axf:footnote-number-citation ref-id="fn_{@id}"/>
</fo:inline>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
<xsl:apply-templates mode="content"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:template>
</xsl:stylesheet>
あなたは、これまで私たちにあなたが持っている、関連するXSLTを表示することができますか? –