Odd and even page displays in XSL-FO

Discussion in 'XML' started by Nathan, Aug 30, 2005.

  1. Nathan

    Nathan Guest

    Hi,
    I seem to having a peculiar problem with the display of odd and even
    pages in XSL-FO. Here is a small background of the problem.
    My xsl stylesheet mentions my fo:layout-master-set as

    <fo:layout-master-set>
    <fo:simple-page-master margin-left="0.5in" margin-right="0.5in"
    page-width="8.5in" margin-bottom="0.5in" master-name="Section-odd-page"
    margin-top="0.5in" page-height="14in">
    <fo:region-after region-name="xsl-region-after-odd"
    extent="0.25in"></fo:region-after>
    <fo:region-body region-name="xsl-region-body-odd"
    margin="1in" font-family="arial" font-size="10pt"></fo:region-body >
    <fo:region-before region-name="xsl-region-before-odd"
    extent="1in"></fo:region-before>
    </fo:simple-page-master>
    <fo:simple-page-master margin-left="0.5in" margin-right="0.5in"
    page-width="8.5in" margin-bottom="0.5in"
    master-name="Section-even-page" margin-top="0.5in" page-height="14in">
    <fo:region-after region-name="xsl-region-after-even"
    extent="0.25in"></fo:region-after>
    <fo:region-body region-name="xsl-region-body-even"
    margin="1in" font-family="arial" font-size="10pt"></fo:region-body >
    <fo:region-before region-name="xsl-region-before-even"
    extent="1in"></fo:region-before>
    </fo:simple-page-master>
    </fo:layout-master-set>

    My page-sequence-master appears as

    <fo:page-sequence-master master-name="content">
    <fo:repeatable-page-master-alternatives>
    <fo:conditional-page-master-reference page-position="first"
    master-reference="ChapTOC"/>
    <fo:conditional-page-master-reference odd-or-even="odd"
    master-reference="Section-odd-page"/>
    <fo:conditional-page-master-reference odd-or-even="even"
    master-reference="Section-even-page"/>
    </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

    My page-sequence for the "Section-odd-page" and "Section-even-page"
    appears as

    <fo:page-sequence master-reference="Section-odd-page">
    <fo:static-content flow-name="xsl-region-before-odd">
    <fo:table table-layout="fixed">
    <fo:table-column column-width="1.5in"
    text-align="left"/>
    <fo:table-column column-width="5in"
    text-align="center"/>
    <fo:table-column column-width="1.5in"
    text-align="right"/>
    <fo:table-body>
    <fo:table-row>
    <fo:table-cell/>
    <fo:table-cell text-align="center">
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">20pt</xsl:attribute>
    <xsl:attribute
    name="font-weight">bold</xsl:attribute>
    <xsl:attribute name="font-family">Arial</xsl:attribute>
    <xsl:value-of select="/airbook/title"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block margin-top="2mm"
    font-family="arial">
    <xsl:attribute
    name="font-size">12pt</xsl:attribute>
    <xsl:text>Rev No. </xsl:text>
    <xsl:value-of select="/airbook/@tsn"/>
    </fo:block>
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">12pt</xsl:attribute>
    <xsl:text>Date: </xsl:text>
    <xsl:value-of
    select="/airbook/@revdate"/>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell/>
    <fo:table-cell text-align="center">
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">18pt</xsl:attribute>
    <xsl:attribute
    name="font-weight">bold</xsl:attribute>
    <xsl:text>Chapter </xsl:text>
    <xsl:value-of select="@chapnbr"/><fo:inline> </fo:inline>
    <xsl:value-of select="./title"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    </fo:table-cell>
    </fo:table-row>
    </fo:table-body>
    </fo:table>
    </fo:static-content>
    <fo:static-content flow-name="xsl-region-after-odd">
    <fo:block font-family="arial" text-align="center">
    <fo:page-number/>
    </fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body-odd">
    <fo:block font-family="arial"><xsl:apply-templates
    select="*"/></fo:block>
    </fo:flow >
    </fo:page-sequence>

    <fo:page-sequence master-reference="Section-even-page">
    <fo:static-content flow-name="xsl-region-before-even"><!--
    <fo:table table-layout="fixed">
    <fo:table-column column-width="1.5in"
    text-align="left"/>
    <fo:table-column column-width="5in"
    text-align="center"/>
    <fo:table-column column-width="1.5in"
    text-align="right"/>
    <fo:table-body>
    <fo:table-row>
    <fo:table-cell>
    <fo:block margin-top="2mm" font-family="arial">
    <xsl:attribute
    name="font-size">12pt</xsl:attribute>
    <xsl:text>Rev No. </xsl:text>
    <xsl:value-of select="/airbook/@tsn"/>
    </fo:block>
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">12pt</xsl:attribute>
    <xsl:text>Date: </xsl:text>
    <xsl:value-of
    select="/airbook/@revdate"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell text-align="center">
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">20pt</xsl:attribute>
    <xsl:attribute
    name="font-weight">bold</xsl:attribute>
    <xsl:attribute name="font-family">Arial</xsl:attribute>
    <xsl:value-of select="/airbook/title"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell/>
    <fo:table-cell text-align="center">
    <fo:block font-family="arial">
    <xsl:attribute
    name="font-size">18pt</xsl:attribute>
    <xsl:attribute
    name="font-weight">bold</xsl:attribute>
    <xsl:text>Chapter </xsl:text>
    <xsl:value-of select="@chapnbr"/><fo:inline> </fo:inline>
    <xsl:value-of select="./title"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    </fo:table-cell>
    </fo:table-row>
    </fo:table-body>
    </fo:table>
    </fo:static-content>-->
    <fo:static-content flow-name="xsl-region-after-even">
    <fo:block font-family="arial" text-align="center">
    <fo:page-number/>
    </fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body-even">
    <fo:block font-family="arial"><xsl:apply-templates
    select="*"/></fo:block>
    </fo:flow >
    </fo:page-sequence>

    My problem is that the "Section-even-page" is not being displayed at
    all."Section-odd-page" layout is being displayed for both odd and even
    pages. It would be great if anyone could help me out with this.

    Regards,
    Nathan
     
    Nathan, Aug 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick

    odd and even signals

    Patrick, Dec 21, 2004, in forum: VHDL
    Replies:
    1
    Views:
    2,830
    Jonathan Bromley
    Dec 21, 2004
  2. Chumley Walrus
    Replies:
    1
    Views:
    12,235
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  3. Stan Goodman

    Even older fart, even newer newbie

    Stan Goodman, Jul 3, 2003, in forum: Java
    Replies:
    11
    Views:
    722
    Stan Goodman
    Jul 4, 2003
  4. Replies:
    1
    Views:
    3,688
    A. Bolmarcich
    May 27, 2005
  5. Serve Laurijssen

    odd/even bitwise and

    Serve Laurijssen, Apr 6, 2004, in forum: C Programming
    Replies:
    27
    Views:
    1,253
    Michael Wojcik
    Apr 13, 2004
Loading...

Share This Page