Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Odd and even page displays in XSL-FO

Reply
Thread Tools

Odd and even page displays in XSL-FO

 
 
Nathan
Guest
Posts: n/a
 
      08-30-2005
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

<foage-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>
</foage-sequence-master>

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

<foage-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">
<foage-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 >
</foage-sequence>

<foage-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">
<foage-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 >
</foage-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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why my working ps/2 mouse freezes and even don't even get recon.after reboot ? demi General Computer Support 0 08-03-2007 05:30 AM
Why my working ps/2 mouse freezes and even don't even get recon.after reboot ? demi General Computer Support 0 08-03-2007 05:28 AM
odd and even signals Patrick VHDL 1 12-21-2004 04:32 PM
Classic asp date displays- changing over to aspnet date object displays Chumley Walrus ASP .Net 1 12-16-2004 09:57 PM
odd/even bitwise and Serve Laurijssen C Programming 27 04-13-2004 03:06 PM



Advertisments