[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Different (body) layout on odd and even pages in XSL-FO?


Subject: Re: [xsl] Different (body) layout on odd and even pages in XSL-FO?
From: "Christian Rosberg" <christian.rosberg@xxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Dec 2004 15:10:27 +0100

Hi again and thanks for the quick response.

I have tried to use even and odd region-bodies without success. I recently found another post discussing my problem http://www.biglist.com/lists/xsl-list/archives/200304/msg00994.html and it seems like it isn't possible to use different region-bodies when you are using fo:flow, using fo:static it works fine but when I use it with fo:flow I get the flowing data on odd pages and the even pages are empty. I guess it is because I can't divide my flows into different layouts, where should I place my <xsl:apply-templates select="..."/>? Can I place the same apply-templates-tag in different region-bodies?

Any suggestion will be very appreciated.
Thanks,
Christian

----- Original Message ----- From: "Arun Sinha" <arunsinha666@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, December 14, 2004 11:20 AM
Subject: RE: [xsl] Different (body) layout on odd and even pages in XSL-FO?




Hi


My problem is that I want the images of the products on the outer edge of the page, that is, images of the products to the left on the left page (odd) and to the right on the right page (even). I have figured out that it perhaps is necessary to use some kind of multiple/alternative flow (which isn't supported in XSL-FO 1.0), or is it possible to it in some other way? Is there any workaround?


You can achieve it by defination of the following layout master.
What you need to do is to calling the static-contect and region-body with right flow-name.
Hope it helps.


<fo:layout-master-set>
<fo:simple-page-master
master-name="odd"
page-height ="297mm"
page-width ="210mm"
margin-left ="2mm"
margin-right ="2mm">
<fo:region-body region-name="bodyodd" margin-top="118mm" margin-bottom="50mm" />
<fo:region-before region-name="headerodd" extent="116mm"/>
<fo:region-after region-name="footerodd" extent="48mm"/>
</fo:simple-page-master>


<fo:simple-page-master
master-name="even"
page-height ="297mm"
page-width ="210mm"
margin-left ="2mm"
margin-right ="2mm">
<fo:region-body region-name="bodyeven" margin-top="118mm" margin-bottom="50mm" />
<fo:region-before region-name="headereven" extent="116mm"/>
<fo:region-after region-name="footereven" extent="48mm"/>
</fo:simple-page-master>


<fo:page-sequence-master master-name="A4">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="odd" blank-or-not-blank="any" odd-or-even="odd" />
<fo:conditional-page-master-reference master-name="even" blank-or-not-blank="any" odd-or-even="even" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>


</fo:layout-master-set>

Cheers.

Arun

_________________________________________________________________
Chat with 1000s of singles. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Let BharatMatrimony.com's Instant Messenger show you how.


Current Thread