Headr and footer problem
Hi All,
i am new to XSL:FO. i created a XSL file. When i ran FOP with xsl and xml i got 3 pages pdf. now my problem is..
I want header on first page i don't want on other pages, same like i want footer on last page only.
One more thing is if it is only single page then i need header and footer.
I have try with this:
<fo:layout-master-set>
<fo:simple-page-master margin-bottom="0.5cm" margin-left="1cm" margin-right="1cm" margin-top="1cm" master-name="firstpage" page-height="28cm" page-width="21cm">
<fo:region-before region-name="firstpage"/>
<fo:region-body margin-top="8.5cm" margin-bottom="3cm"/>
</fo:simple-page-master>
<fo:simple-page-master margin-bottom="0.5cm" margin-left="1cm" margin-right="1cm" margin-top="1cm" master-name="lastpage" page-height="28cm" page-width="21cm">
<fo:region-before region-name="lastpage"/>
<fo:region-body margin-top="3.5cm" margin-bottom="3cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="all">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="firstpage" page-position="first"/>
</fo:repeatable-page-master-alternatives>
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="lastpage" page-position="any"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="all">
<fo:static-content flow-name="firstpage">
<xsl:call-template name="header"/>
<xsl:call-template name ="footer2"/>
</fo:static-content>
<fo:static-content flow-name="lastpage">
<xsl:call-template name="header2"/>
<xsl:call-template name ="footer"/>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="body"/>
</fo:flow>
</fo:page-sequence>
Is there any possibilities to do like, could any one can assist me in this regard.
Thanks.
Red.
|