Odd and even page displays in XSL-FO

Nathan (archive)

Usenet Archive
Joined
Jun 30, 2000
Messages
80
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,050
Messages
3,104,249
Members
248,133
Latest member
DujonT

Latest Threads

Top