Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 1st, 2008, 08:43 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSL Fo: Forcing page numbers

Hi

I am new to fo and am facing a peculiar problem that I am not able to resolve. The business requirement is such that I have a heading page that has a title and rest of the document (ROD) . The ROD page numbers have to start with Page number 1. .i.e Page 2 of the document should have the page number as 1. I wrote the Heading page and ROD in two different page-sequence. When I print this PDF after the first page I have a blank page appearing. This issue arises whenever I put initial-page-number="1" in the second page sequence. If I remove this the document works fine but the first page in ROD has Page number as 2. Any help in this scenario is helpful. Below is my code snippet

 <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

        <xsl:template match="/">
                <fo:root font-family="TimesNewRoman" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
                         xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office">
                        <fo:layout-master-set xmlns:v="urn:schemas-microsoft-com:vml" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
                                <fo:simple-page-master master-name="section1-first-page" page-width="8.5in" page-height="11in" margin-top="36pt" margin-bottom="36pt" margin-right="54pt" margin-left="45pt">
                                        <fo:region-body margin-top="36pt" margin-bottom="36pt"></fo:region-body>
                                        <fo:region-before region-name="first-page-header" extent="5in"></fo:region-before>
                                        <fo:region-after region-name="first-page-footer" extent="11in" display-align="after"></fo:region-after>
                                </fo:simple-page-master>
                                <fo:simple-page-master master-name="section1-odd-page" page-width="8.5in" page-height="11in" margin-top="36pt" margin-bottom="36pt" margin-right="54pt" margin-left="45pt">
                                        <fo:region-body margin-top="36pt" margin-bottom="36pt"></fo:region-body>
                                        <fo:region-before region-name="odd-page-header" extent="5in"></fo:region-before>
                                        <fo:region-after region-name="odd-page-footer" extent="11in" display-align="after"></fo:region-after>
                                </fo:simple-page-master>
                                <fo:simple-page-master master-name="section1-even-page" page-width="8.5in" page-height="11in" margin-top="36pt" margin-bottom="36pt" margin-right="54pt" margin-left="45pt">
                                        <fo:region-body margin-top="36pt" margin-bottom="36pt"></fo:region-body>
                                        <fo:region-before region-name="even-page-header" extent="5in"></fo:region-before>
                                        <fo:region-after region-name="even-page-footer" extent="11in" display-align="after"></fo:region-after>
                                </fo:simple-page-master>
                                <fo:page-sequence-master master-name="section1-page-sequence-master">
                                        <fo:repeatable-page-master-alternatives>
                                                <fo:conditional-page-master-reference odd-or-even="odd" master-reference="section1-odd-page"/>
                                                <fo:conditional-page-master-reference odd-or-even="even" master-reference="section1-even-page"/>
                                        </fo:repeatable-page-master-alternatives>
                                </fo:page-sequence-master>
                        </fo:layout-master-set>
                        <fo:page-sequence master-reference="section1-page-sequence-master" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:w10="urn:schemas-microsoft-com:office:word"
                                          xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
                                <fo:flow flow-name="xsl-region-body">
                                <fo:block><fo:inline>hello</fo:inline></fo:block>
                                </fo:flow>
                        </fo:page-sequence>

                                                <fo:page-sequence master-reference="section1-page-sequence-master" initial-page-number="1" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:w10="urn:schemas-microsoft-com:office:word"
                                          xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
                                <fo:flow flow-name="xsl-region-body1">
                                <fo:block><fo:inline>hello1</fo:inline></fo:block>
                                </fo:flow>
                        </fo:page-sequence>

                </fo:root>
        </xsl:template>
</xsl:stylesheet>


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL-FO NEO1976 XML 2 July 19th, 2006 10:10 AM
xsl:fo with Select Birger XSLT 4 July 18th, 2006 11:38 AM
how to assign fo:page-number to a xsl:variable or jyotsnag XSLT 0 March 14th, 2006 01:49 AM
XSL-FO Question gray XSLT 1 February 18th, 2005 11:31 AM
hello, some problems with XSL-FO LuisMM XSLT 4 December 19th, 2003 02:55 PM



All times are GMT -4. The time now is 01:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.