首页 > 解决方案 > 将页脚页码(十进制)更改为标题缩写

问题描述

我正在做dita-ot pdf转换,使用大量主题dita模板,要求将十进制页码更改为单独一个主题的主题标题缩写,其他主题应该是十进制页码

在 commons.xsl

<xsl:template match="*[contains(@class, ' topic/topic ')]">

<xsl:when test="not(ancestor::*[contains(@class, ' topic/topic ')]) and not(ancestor::ot-placeholder:glossarylist)">
<fo:page-sequence master-reference="{$page-sequence-reference}" xsl:use-attribute-sets="__force__page__count" initial-page-number="1">
<xsl:call-template name="startPageNumbering"/>
</fo:page-sequence>
</xsl:when>

</xsl:template>

Commons-attr.xsl:

<xsl:attribute-set name="__force__page__count">
    <xsl:attribute name="force-page-count">
        <xsl:choose>
            <xsl:when test="name(/*) = 'bookmap'">
                <xsl:value-of select="'even'"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="'auto'"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:attribute>
</xsl:attribute-set>

没有模板startPageNumbering,根据initial-page-numberand force_page_count,从第 1 页开始为每个主题重置十进制页码。所以我只想将一个主题十进制页码更改为相应的主题标题缩写

例如:

<topic class="- topic/topic ">
<title class="- topic/title " outputclass="CD_Section_Heading">DEFINITIONS</title>
</topic>

对于这个DEFINITIONS标题主题页脚页码应该DEF像我有几个主题应该得到标题缩写作为页脚而不是十进制页码。请帮助我,如果您需要更多信息,请告诉我。提前致谢!!!

标签: xsltpdf-generationfooterxsl-fodita

解决方案


推荐阅读