Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 20th, 2008, 10:24 AM
Registered User
Join Date: Apr 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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: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 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:page-sequence-master master-name="all">

            <fo:conditional-page-master-reference master-reference="firstpage" page-position="first"/>
            <fo:conditional-page-master-reference master-reference="lastpage" page-position="any"/>



      <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 flow-name="lastpage">
        <xsl:call-template name="header2"/>
        <xsl:call-template name ="footer"/>

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


Is there any possibilities to do like, could any one can assist me in this regard.

Old April 20th, 2008, 03:40 PM
samjudson's Avatar
Friend of Wrox
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts

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 -/

Similar Threads
Thread Thread Starter Forum Replies Last Post
The footer doesn't appear Tecris BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 February 21st, 2010 05:39 PM
Footer Format Problem rstelma ASP.NET 2.0 Professional 0 August 14th, 2008 04:48 PM
Footer problem monika.vasvani ASP.NET 1.0 and 1.1 Professional 0 October 4th, 2006 02:03 AM
Can't see footer Bud BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 6 August 25th, 2006 04:28 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.