473,853 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:repeatabl e-page-master-alternatives>
<fo:condition al-page-master-reference page-position="first "
master-reference="Chap TOC"/>
<fo:condition al-page-master-reference odd-or-even="odd"
master-reference="Sect ion-odd-page"/>
<fo:condition al-page-master-reference odd-or-even="even"
master-reference="Sect ion-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="Sect ion-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:attribut e
name="font-size">20pt</xsl:attribute>
<xsl:attribut e
name="font-weight">bold</xsl:attribute>
<xsl:attribut e 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:attribut e
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:attribut e
name="font-size">12pt</xsl:attribute>
<xsl:text>Dat e: </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:attribut e
name="font-size">18pt</xsl:attribute>
<xsl:attribut e
name="font-weight">bold</xsl:attribute>
<xsl:text>Chapt er </xsl:text>
<xsl:value-of select="@chapnb r"/><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="Sect ion-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:attribut e
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:attribut e
name="font-size">12pt</xsl:attribute>
<xsl:text>Dat e: </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:attribut e
name="font-size">20pt</xsl:attribute>
<xsl:attribut e
name="font-weight">bold</xsl:attribute>
<xsl:attribut e 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:attribut e
name="font-size">18pt</xsl:attribute>
<xsl:attribut e
name="font-weight">bold</xsl:attribute>
<xsl:text>Chapt er </xsl:text>
<xsl:value-of select="@chapnb r"/><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 2435

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

Similar topics

0
1246
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 .xsl page <?xml version="1.0"?> <xsl:stylesheet version="1.0"
0
1144
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 on. I've got it sort of working to the extent that the first first page outputs 20 results but when I click next the next 20 results aren't displayed, to see what I mean click the following link, press search (without entering anything) and then...
35
3400
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 week and are named XX-XX-XX.ASX where the X's represent the date i.e. 05-22-05.asx The files are a specific format and will always contain tags like the following: <TITLE>My media file title</TITLE> <AUTHOR>Media file author</AUTHOR> <Ref href =...
0
1437
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 'next' link at the bottom of the page and when I click on that, the next 20 results are shown on screen and so on. When I click the 'view all' link, the view .asp page opens the data.xml and view.xsl pages but the xsl page isn't outputing the results....
4
3723
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 file via some editable controls such as text boxes , option boxes etc. how can i implment this , should i use another xslt file with <INPUT> controls . if so how can i save the result back using the asp.net
0
1429
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 results on one page and for some queries there are hundreds of results that take a long time to uotput and wastes a lot of bandwidth. Heres a quick rundown on the structure of my site:-
2
1284
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 which further processes it and passes it back to the asp in an xml format Finally the asp page has to open the output in html in the same page. The created xml file has the details to the xsl stylesheet . but presently the o/p gets diaplyed in an...
1
3252
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 achieve this? I will be very greatefull for any help. Have a look below ===================================================== Response from Server using HttpRequest Object =====================================================
2
3092
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 textbox value in the main page is undefined ---------------------------------------- here are code main page: ------------------------------------------- <script language="JavaScript"> var thedata; var newwin; var thenumber; function...
3
2385
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. I'm creating .aspx files with which will include an XML file of the products at the bottom of each page. To do this, I have the following code in my .aspx file where the XML data goes: <asp:Xml runat="server" documentSource="more.xml"...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10358
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9506
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5934
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4549
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.