All table headers and footers must be positioned before all table bodies inside a table element.
For example, this XSL-FO will generate a strict formatting error, because the table-footer is positioned after the table-body:
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="all-pages" page-width="8.5in" page-height="11in">
</fo:simple-page-master>
<fo:page-sequence-master master-name="default-sequence">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-sequence">
<fo:flow flow-name="xsl-region-body" font-size="12pt" font-family="Times New Roman">
<fo:table>
<fo:table-column column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell>
<fo:block>header text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>cell text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
<fo:table-footer>
<fo:table-row>
<fo:table-cell>
<fo:block>footer text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
The following XSL-FO will render fine:
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="all-pages" page-width="8.5in" page-height="11in">
</fo:simple-page-master>
<fo:page-sequence-master master-name="default-sequence">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-sequence">
<fo:flow flow-name="xsl-region-body" font-size="12pt" font-family="Times New Roman">
<fo:table>
<fo:table-column column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell>
<fo:block>header text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer>
<fo:table-row>
<fo:table-cell>
<fo:block>footer text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>cell text</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>