我正在尝试使用 pdf 生成生成 mod 规范。我生成它的方式是使用如下所示的 contents.xml 文件...
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="http://docbook.org/ns/docbook http://schema.5d.ca/docbook/docbook.xsd
http://www.w3.org/2001/XInclude http://schema.5d.ca/docbook/XInclude.xsd">
<title>Mod Spec</title>
<?dbfo-need height="8in" space-before="3em" ?>
<xi:include href="first.xml"/>
<section>
<title>View Stuff</title>
<xi:include href="./stuff/panel.xml"/>
</section>
<section>
<title>Nav things</title>
<xi:include href="./things/about.xml"/>
<xi:include href="./things/control.xml"/>
<xi:include href="./things/launch.xml"/>
</section>
...(more sections with includes)
</article>
现在我还有一个样式表,它在为 XSL-FO 发送上述 xml 之前设置页眉、页脚和表格样式,并且这个样式表需要添加分页符。
所以我的问题是:如何在 contents.xml 中的所有单独的 modspecs 之间添加分页符?
编辑 http://www.sagehill.net/docbookxsl/PageBreaking.html状态我应该将此添加到我的 XSLT:
<xsl:template match="processing-instruction('hard-pagebreak')">
<fo:block break-after='page'/>
</xsl:template>
这样它就可以<?hard-pagebreak?>
在 .xml 文件中找到。我想使解决方案尽可能紧凑,那么如何编辑我的样式表,以便第一次通过将添加<?hard-pagebreak?>
每个<xi:include>
之后,然后是给定我的 sagehill 的模板?