By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,285 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,285 IT Pros & Developers. It's quick & easy.

Odd and even page displays in XSL-FO

P: n/a
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

Aug 30 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.