Subject: Headr and footer problem
Posted By: redro Post Date: 4/20/2008 10:24:19 AM
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.
Reply By: samjudson Reply Date: 4/20/2008 3:40:59 PM
I suspect this is more of an XSL-FO question - I recommend you check out the mailing list mentioned in reply to your other post.

/- Sam Judson : Wrox Technical Editor -/

Go to topic 70746

Return to index page 1