473,382 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Odd and even page displays in XSL-FO

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
0 2396

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: thomas | last post by:
I was wandering if theres a way to make a .xsl page output 20 results per page. My page transforms an .xml file but as its a large file, it outputs hundreds of results on the same page. heres my...
0
by: thomas | last post by:
This problem has been bothering me for a couple of days now. I'm trying to get a small xml based search engine to output 20 results on one page then 20 on the next page when you click a link and so...
35
by: .:mmac:. | last post by:
I have a bunch of files (Playlist files for media player) and I am trying to create an automatically generated web page that includes the last 20 or 30 of these files. The files are created every...
0
by: thomas | last post by:
Hi all, I was wandering is anyone can help. When I click on the 'view all' link on my homepage http://www.guitarmidi.co.uk I woild like to output the first 20 results on screen then have a...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
0
by: tom | last post by:
Hi all, I'm having a bit of trouble getting my site to output a certain number of results per page. Any help on this would be greatly appriciated. Without this function my code outputs all...
2
by: nivi | last post by:
Hi Gurus, I have a problem with the way my output gets displayed in my asp page I have the UI in ASP which asks for input from a user on the asp page and then passes that data to a perl file...
1
by: MORALBAROMETER | last post by:
Hi all, I want to update MULTIPLE elements of an HTML page using Ajax. for this reason i my response is an xml document. I want to use XSL at the client side to update these elements. How can i...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
3
by: shifflav | last post by:
I'm not sure if this would classify as an XML or ASP question: I'm redoing someone's website who sells various products. I've decided to teach myself XSLT and re-do the entire site using XML. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.