<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master master-name="first"
page-height="%%height%%"
page-width="%%width%%"
margin-top="10mm"
margin-bottom="10mm"
margin-left="10mm"
margin-right="10mm">
<fo:region-body margin-top="10mm" margin-bottom="10mm"/>
<fo:region-before extent="10mm"/>
<fo:region-after extent="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>

<!-- starts actual layout -->
<fo:page-sequence master-reference="first">

<!-- usage of page layout -->
<!-- header -->
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="end" 
    font-size="10pt" 
    font-family="serif" 
    line-height="14pt" >
Pagina <fo:page-number/> din <fo:page-number-citation ref-id="last-page"/>
</fo:block>

</fo:static-content> 
                                                                                           
<fo:flow flow-name="xsl-region-body">

<fo:block font-family="monospace" text-align="start" white-space-collapse="false">
%%title%%
</fo:block>

<fo:block font-family="monospace" text-align="start" white-space-collapse="false">
%%criteria%%
</fo:block>

<fo:table table-layout="fixed" border-collapse="separate" table-omit-header-at-break="false">
%%columns%%

<fo:table-header>
<fo:table-row>
%%header%%
</fo:table-row>

</fo:table-header>

<fo:table-body>

%%content%%

<fo:table-row>
%%totals%%
</fo:table-row>

</fo:table-body>
</fo:table>
<!-- table end --> 

<fo:block id="last-page"/>

</fo:flow>
</fo:page-sequence>
</fo:root>
