多页 pdf,每个人标签使用翻页

Multi page pdf using fop-one page for each person tag

我需要使用 xsl-fo 模板将我的 xml 数据转换为使用 fop 的 pdf。 我的 XML 数据看起来像。

<resultset>
<person>
</person>
<person>
</person>
<person>
</person>
</resultset>

每个人标签都需要进入 pdf 中的单独页面。能 有人请用示例 xsl-fo 模板指导我。

两种选择:

这将帮助您入门,具体取决于人员标签中的信息。

<xsl:template match="person">
    <fo:block page-break-before="always">
         process the contents of the person tag here
    </fo:block>
</xsl:template>

一些背景信息:
XSLT
XSL-FO
XSL-FO 2