Xslt 如何在分页符后在表的末尾和开头添加额外的行

Xslt 如何在分页符后在表的末尾和开头添加额外的行,xslt,xsl-fo,apache-fop,Xslt,Xsl Fo,Apache Fop,如上所述,如何在分页符后添加仅在表的结尾和开头可见的行 是否有任何属性可用于表行,以指定它是页面上的最后一行还是第一行 这种情况是,我需要该行来计算前面一列的小计,但对于我来说,这不适用于表尾或表头 <fo:table table-layout="fixed" width="100%" margin-top="1cm"> <fo:table-column column-width="85%"/>

如上所述,如何在分页符后添加仅在表的结尾和开头可见的行

是否有任何属性可用于表行,以指定它是页面上的最后一行还是第一行

这种情况是,我需要该行来计算前面一列的小计,但对于我来说,这不适用于表尾或表头

<fo:table table-layout="fixed" width="100%" margin-top="1cm">
                    <fo:table-column column-width="85%"/>
                    <fo:table-column column-width="14%"/>
                    <fo:table-column column-width="1%"/>
                    <fo:table-footer>                         
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                    <fo:retrieve-table-marker retrieve-position-within-table="last-ending" retrieve-class-name="subtotal-caption"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                    <fo:retrieve-table-marker retrieve-position-within-table="last-ending" retrieve-class-name="subtotal"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block></fo:block>
                            </fo:table-cell>
                        </fo:table-row>                                         
                    </fo:table-footer>
                    <fo:table-body>
                        <fo:marker marker-class-name="subtotal-caption"/>
                        <fo:marker marker-class-name="subtotal"/>
                        <fo:table-row>  
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block font-weight="bold" text-align="right">
                                    EUR
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <xsl:for-each select="/document/data/list/invoice/list/position">                                                                          
                            <fo:table-row>
                                <fo:table-cell>                             
                                    <fo:marker marker-class-name="subtotal-caption">
                                        Zwischenssumme                                  
                                    </fo:marker>
                                    <fo:block>
                                        <xsl:value-of select="name/text()"/>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:marker marker-class-name="subtotal">
                                        <xsl:value-of select="amount + sum(preceding::amount/text()) - /document/data/list/invoice/amount/text()"/>
                                    </fo:marker>
                                    <fo:block text-align="right">
                                        <xsl:value-of select="format-number(amount/text(), '###.##0,00', 'european')"/>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block text-align="left">
                                        <xsl:if test="vat = 1">
                                            <xsl:value-of select="' *'"/>
                                        </xsl:if>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row> 
                        </xsl:for-each>
                    </fo:table-body>
                </fo:table>

欧元
Zwischenssumme
我想要得到的是这样的东西:

  • 位置A-1欧元
  • B-2号位置欧元
  • C-2号位置欧元
  • 小计-5欧元
  • 。。。下一页
但目前的结果是:

  • 位置A-1欧元
  • B-2号位置欧元
  • C-2号位置欧元
  • 。。。下一页

我已编辑了您的标题。看,不清楚你在问什么。请包括实际的XSL-FO和XSLT代码,可能还包括FOP如何呈现PDF的描述。您是否正在考虑在表格溢出到下一页时添加边距?您是否尝试过@boomchickawah中描述的扩展函数“axf:footnote keep”您的查询是否已解决。甚至我也陷入了同样的场景中,我希望每一页的结尾都有总金额。