xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Rahtz" <sebastian.ra...@computing-services.oxford.ac.uk>
Subject Re: Unknown # of pages and static content
Date Mon, 02 Oct 2000 18:29:57 GMT
Hani Elabed writes:
 > While the solution you suggested allows us to change the Layout
 > of the remaining pages, it does NOT allow
 > us to change the content( i.e data ) of the
 > <fo:static-content flow-name="xsl-region-before">
 > 
 > This is because the  <fo: static-content ... >
 > is defined inside <fo: page-sequence as follows...>
 > and there is NO WAY to tell FOP to use ONE
 > <fo:static-content flow-name="xsl-region-before">
 > for the 1st page and ANOTHER for subsequent pages...

Sorry, but it's easy. the "firstpage" page-master puts a static flow
called "xsl-region-before-firstpage" in the before region:

        <fo:simple-page-master master-name="firstpage"
                               page-height="297mm" page-width="210mm"
                               margin-top="20mm"  margin-bottom="10mm"
                               margin-left="25mm" margin-right="20mm">
          <fo:region-before
                region-name="xsl-region-before-firstpage"
                extent="10mm"/>

while "evenpage" puts "xsl-region-before-evenpage" there:

        <fo:simple-page-master master-name="evenpage"
                               page-height="297mm" page-width="210mm"
                               margin-top="20mm"  margin-bottom="10mm"
                               margin-left="25mm" margin-right="20mm">
          <fo:region-before
                region-name="xsl-region-before-evenpage"
                extent="10mm"/>

now in the page-sequence you can say

   <fo:static-content flow-name="xsl-region-before-evenpage">
          <fo:block>I am an even page</fo:block>
   </fo:static-content>
   <fo:static-content flow-name="xsl-region-before-firstpage">
          <fo:block>I am a first page</fo:block>
   </fo:static-content>

and get changed headers. you match up the "flow-name" of
static-content to the "region-name" of fo:region-before - the names
are arbitrary! you probably got confused by the earlier drafts where I
recall that the names were fixed.

If you want *dynamic* headers, you need fo:marker and
fo:retrieve-marker, which can be used to eg put section headings in
running heads. has FOP implemented those yet?

sebastian


Mime
View raw message