AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Pagenation

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  Does XSL Formatter allow different layouts for the first page and second page or for even and odd pages, for example? [No.2002032504]
A. 

It's possible to have the different page layouts for the first page, for even and odd pages alternately, for blank pages by specifying "page-sequence-master" to the stylesheet.

Here is a sample code for generating different layouts on even and odd pages.

<fo:layout-master-set>
    <fo:simple-page-master master-name="odd-page-master">
        <fo:region-before region-name="odd-page-header"/>
        ......other descriptions
    </fo:simple-page-master>
    <fo:simple-page-master master-name="even-page-master">
        <fo:region-before region-name="even-page-header"/>
        ......other descriptions
    </fo:simple-page-master>

    <fo:page-sequence-master master-name="main">
        <fo:repeatable-page-master-alternatives>
            <fo:conditional-page-master-reference master-reference="odd-page-master" odd-or-even="odd" />
            <fo:conditional-page-master-reference master-reference="even-page-master" odd-or-even="even" />
        </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="main">
    <fo:static-content flow-name="odd-page-header">
    ......contents for header on odd pages (Specify text-align="end")
    </fo:static-content>
    <fo:static-content flow-name="even-page-header">
    ......contents for header on even pages (Specify text-align="start")
    </fo:static-content>
    <fo:flow>
    ......contents of text
    </fo:flow>
</fo:page-sequence>

Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.