Header and Footer XSL FO
===

I want to create a PDF document with a header and a footer in every pages, I don't know why they only appears in odd pages. 

I simplify the code and I create a table and I repeated several times to have 4 pages but the result is the same, the header and footer appears only in the first and the third page.

Here is the code. 

    <xsl:output indent="yes"/>

    <xsl:template match ="template">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
        
        <fo:layout-master-set>
	<!-- layout information -->
	<fo:simple-page-master master-name="pagetemplate"
	              page-height="29.7cm"
	              page-width="21cm"
	              margin-top="1cm"
	              margin-bottom="0.1cm"
	              margin-left="0.8cm"
	              margin-right="1.0cm">
	  <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
	  <fo:region-before extent="2.0cm"/>
	  <fo:region-after extent="2.0cm"/>
	</fo:simple-page-master>
	</fo:layout-master-set>
	
	<fo:page-sequence master-reference="pagetemplate">
	
              <fo:static-content flow-name="xsl-region-before">
		  <fo:block>
		       <xsl:call-template name="header"/>
		   </fo:block>
	      </fo:static-content>

	      <fo:static-content flow-name="xsl-region-after">
		   <fo:block>
			<xsl:call-template name="footer"/>
		   </fo:block>
	      </fo:static-content>
        
	      <fo:flow flow-name="xsl-region-body">

		 <xsl:call-template name="block"/>
                 <xsl:call-template name="block"/>
                 <xsl:call-template name="block"/>
                 <xsl:call-template name="block"/>
			
	      </fo:flow>

	</fo:page-sequence>

	</fo:root>

    </xsl:template>