xslt - 将页脚页码(十进制)更改为标题缩写
问题描述
我正在做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-number
and force_page_count
,从第 1 页开始为每个主题重置十进制页码。所以我只想将一个主题十进制页码更改为相应的主题标题缩写
例如:
<topic class="- topic/topic ">
<title class="- topic/title " outputclass="CD_Section_Heading">DEFINITIONS</title>
</topic>
对于这个DEFINITIONS
标题主题页脚页码应该DEF
像我有几个主题应该得到标题缩写作为页脚而不是十进制页码。请帮助我,如果您需要更多信息,请告诉我。提前致谢!!!
解决方案
推荐阅读
- java - PropertyReferenceException 的原因是什么
- java - Java 8 Streams - 比较两个列表的对象值并将值添加到新列表?
- python-3.x - 更新谷歌电子表格中的多个工作表
- xslt - 使用 Xpath 和 XSLT 选择特定字符串
- php - preg_match() 使用 curl 响应返回 null
- r - 在 R 中使用 Heemod 对马尔可夫模型进行概率敏感性分析
- json - 用双引号(“)括起来的字符串会导致 json.loads() 出错
- c# - 如何在 c# xUnit 测试用例中模拟构造函数?
- java - 如何注册自定义约束验证器
- python - 文件更新上的 Office365-REST-Python-Client 401