我使用XSLT代码创建了索引页面。内容名称正确显示索引页面,但我想根据特定标题的页码映射内容。
我正在使用他们的描述获得标题所以我将该块命名为id =“TOC”并将其命名为ref-id =“TOC”但页码不会反映在我的标题中。
标题: - 索引页面中的标题名称。
摘要: - 与页面相关联的标题内容。
以下是我的XSLT-2.0示例代码:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="content_name">
<fo:block space-after="7pt" space-after.conditionality="retain" line-height="1.147" font-family="Calibri" font-size="15pt" font-weight="bold" language="FR">
<fo:inline>
<fo:leader leader-length="0pt" />
<xsl:value-of select="title"/>
<fo:page-number-citation ref-id="TOC"/>
</fo:inline>
</fo:block>
</xsl:template>
<xsl:template match="pro_list">
<fo:block space-after="15pt" space-after.conditionality="retain" line-height="1.147" font-family="Calibri" font-size="15pt" font-weight="bold" text-decoration="underline" language="FR">
<fo:inline>
<fo:leader leader-length="0pt" />
<xsl:value-of select="title" id="TOC"/>
</fo:inline>
</fo:block>
<fo:block space-after="8pt" space-after.conditionality="retain" line-height="1.147" font-family="Calibri" font-size="15pt" language="FR">
<fo:inline>
<fo:leader leader-length="0pt"/>
<xsl:value-of select="summary" disable-output-escaping="yes" />
</fo:inline>
</fo:block>
</xsl:template>
</xsl:stylesheet>
这是输出:
Contents
Title1 page no.
Title2 page no.
Title3 page no.
假设title1内容与page2&amp;类似于title2-3&amp; title3-4,然后输出如下所示
Contents
Title1 2
Tilte2 3
Title3 4
是否有可用于索引映射的语法或预定义函数?