You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Guillaume Mathe <gm...@smartinnov.com> on 2002/03/25 16:11:41 UTC
different headers / footers in page sequences
Hi,
I have the following XML document structure:
<doc>
<subdoc>
<part-a>
<one-page/>
</part-a>
<part-b>
<lots-of-pages/>
<part-b>
</subdoc>
<subdoc>
<part-a>
<one-page/>
</part-a>
<part-b>
<lots-of-pages/>
<part-b>
</subdoc>
...
</doc>
As you can see there are X subdocs, in which i have a short part-a and a long part-b.
What i'm looking for is a different header set for part-a and part-b.
Here's the layout-master-set from my XSLT:
<fo:layout-master-set>
<fo:simple-page-master master-name="first"...>
<fo:region-body .../>
<fo:region-after extent="20mm" region-name="footer-first"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="rest"...>
<fo:region-body .../>
<fo:region-after extent="20mm" region-name="footer-rest"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="first-and-rest" >
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="first" page-position="first" />
<fo:conditional-page-master-reference master-name="rest" page-position="rest" />
<fo:conditional-page-master-reference master-name="rest" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
Now here's my page-sequence:
<fo:page-sequence master-reference="first-and-rest">
<fo:static-content flow-name="footer-first">
<fo:block text-align="center">blah blah</fo:block>
<fo:block text-align="end">p. <fo:page-number/></fo:block>
</fo:static-content>
<fo:static-content flow-name="footer-rest">
<fo:block text-align="end">p. <fo:page-number/></fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="//subdoc"/>
</fo:flow>
</fo:page-sequence>
Of course part-a and part-b are formatted so they fall on different pages. With a standard page-sequence the output is OK. But with the above page-sequence FOP
gives me an unnamed FOP Exception (i run it from a JAVA program).
What's wrong with my XSL ? How can i get those different footers in the page-sequence ?
Any working solution is welcome.
Regards,
Guillaume Mathe
Smartinnov
Re: different headers / footers in page sequences
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Guillaume Mathe wrote:
> <fo:page-sequence-master master-name="first-and-rest" >
You are using 0.20.3, aren't you? Try master-reference here
and in similar places.
J.Pietschmann