我需要对我的xsl:fo进行转换,并在此基础上对其进行修改。<fo:retrieve-marker>
但我不知道这是否可能,因为我使用FOP处理器进行转换。
如果我使用 <fo:retrieve-marker>
在我的表格中,我总是得到一个错误信息,说标签必须在一个静态内容中。
下面是带有标记的表格
<xsl:call-template name="MMEL-Table-Header"/>
<!-- Bottom table Line -->
<fo:table-footer>
<fo:table-row>
<fo:table-cell>
<fo:marker marker-class-name="footer-continued"> <fo:inline>(continued)</fo:inline></fo:marker>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body >
<xsl:variable name="identification">
<xsl:value-of select="ident/message"/>
</xsl:variable>
<xsl:apply-templates select="ident"><xsl:with-param name="ident" select="$identification"/></xsl:apply-templates>
<xsl:apply-templates select="provisos/proviso"><xsl:with-param name="ident" select="$identification"/></xsl:apply-templates>
<fo:table-row>
<fo:table-cell> <fo:retrieve-marker retrieve-position="first-starting-within-page" retrieve-class-name="footer-continued" retrieve-boundary="document" /> </fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
(披露:我是FOP开发者)
这个例子有动态的表头和表脚,所以它应该能满足你的要求。
 
在表头和表脚中是一个必要的 "占位符"(表头表脚的尺寸只计算一次,没有标记内容)。FO碎片。
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="100%"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:retrieve-table-marker retrieve-class-name="mc1"
retrieve-position-within-table="first-starting"
retrieve-boundary-within-table="table-fragment"/>
 
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:retrieve-table-marker retrieve-class-name="mc2"
retrieve-position-within-table="last-ending"
retrieve-boundary-within-table="table-fragment"/>
 
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body>
<!-- first row -->
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:marker marker-class-name="mc1"></fo:marker>
<fo:marker marker-class-name="mc2">(continues on the next page)</fo:marker>
cell1
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- middle row -->
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:marker marker-class-name="mc1">(continued)</fo:marker>
<fo:marker marker-class-name="mc2">(continues on the next page)</fo:marker>
cell2
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- ... other similar rows ... -->
<!-- last row -->
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:marker marker-class-name="mc1">(continued)</fo:marker>
<fo:marker marker-class-name="mc2"></fo:marker>
cell9
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>