如何在 XSLT 中创建页码? [英] How do I create page numbers in XSLT?
本文介绍了如何在 XSLT 中创建页码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个 c# 应用程序,它获取一个 xml 文件和一个 xslt 文件并创建一个 rtf 文档.这个 rtf 文档有一个页眉页脚和页码,但我不知道如何在 xslt 中做到这一点.
Ive created a c# application which gets an xml file and a xslt file and creates an rtf document. This rtf document is to have a header a footer and page numbers but I can't figure out how to do this in xslt.
有人有什么建议吗?
推荐答案
如果您特别需要在 XSL 中使用某些东西,那么您可以在页脚区域 (xsl-region-after) 中设置一个块,并在该块内可以有这个片段.
If you specifically need something to be used in XSL, then you can have a block in the footer region (xsl-region-after) and within that block you can have this snippet.
<fo:block text-align="right"><fo:page-number format="1"/><fo:page-number-citation format="1" ref-id="last-page"/></fo:block>
不要忘记在
<
fo:block id="last-page"/> just before the </fo:page-sequence>
HTH
这篇关于如何在 XSLT 中创建页码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文