Re: [xsl] How to create document with different headers but same body (xslfo/xslt)

Subject: Re: [xsl] How to create document with different headers but same body (xslfo/xslt)
From: omprakash.v@xxxxxxxxxxxxx
Date: Mon, 7 Feb 2005 18:58:55 +0530
     Have you tried using  the fo:static-content element, This is where you
specify the header and footer you would like to use. You can use this in
conjunction with the page-sequence element and specify one sequence for
only the first page header and content and another sequence for your
remaining content.

Hope this helps.



<fo:simple-page-master page-width="auto" page-height="auto" master-name
="all-pages" page-master-name="one"
><fo:region-body column-gap="12pt" column-count="1" margin-left="1in"
margin-bottom="1in" margin-right="1in" margin-top="1in"/><fo:region-before
display-align="before" extent="1in" region-name
="page-header"/><fo:region-after display-align="after" extent="1in"
region-name="page-footer"/><fo:region-start extent="1in"/><fo:region-end

<fo:page-sequence master-reference="firstpage">

<fo:title>New Page 1</fo:title>

<fo:static-content flow-name="page-header"><fo:block font-size="8pt"
text-align="center" space-before="0.5in" space-before.conditionality
="retain">Very big header</fo:block></fo:static-content>

<fo:static-content flow-name="page-footer">
<fo:block font-size="8pt" text-align="center" space-after="0.5in"
space-after.conditionality="retain">- <fo:page-number/> -</fo:block>

<fo:flow flow-name="xsl-region-body"><fo:block role="html:body">
First page content here

                    Karen Varga                                                                                    
                    <vargakaren@y        To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                   
          >            cc:     (bcc: omprakash.v/Polaris)                                        
                                         Subject:     [xsl] How to create document with different headers but same 
                    02/07/2005           body (xslfo/xslt)                                                         
                    06:26 PM                                                                                       
                    respond to                                                                                     

I am going round and round in circles trying to create
a pdf document (using xslt and xslfo) that has a
different header on the first page to the rest of the
document, but the SAME body.

Basically my body content is solely a list of items
displayed using a xsl:for-each loop.  This list is an
unknown length and needs to flow over to the next page
and the next etc.

The first page of the document has a large header and
footer to display.  But for the rest of the pages I
only need to display a small header section.  The body
for all the pages is however the same.

Does anybody know how to do this?  I have tried all
sorts with multiple page-sequences and a
page-sequence-master but cannot get it to use the same
body.  I cannot have the for loop start again on the
second page, it must continue from the first page.
Also, the size of the items displayed is not limited
to a single line and therefore it is unknown as to how
many items will fit on a page.

I've also tried using an xsl:if statement but don't
know how to get the page number.  I was thinking if I
could get the page number then I could just use an if
statement to determine which header code to display.

Please help!

Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at

Current Thread