Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Consecutive page numbering using XSL:FO-to-PDF

From: "Letitia and Drew Hodge" <ldhodge@-------->
To:
Date: 7/31/2001 3:47:00 PM
I have written an XSLT stylesheet that uses more than one <fo:page-sequence>
to create front matter, a TOC, and chapters in the target PDF document.  To
try and obtain consecutive page numbers that run from the first page of the
first chapter to the last page of the last chapter, I've used the
initial-page-number property, set to "auto", in each <fo:page-sequence>
element.  The result is a PDF document, nicely formatted into chapters with
left and right pages, that has each chapter's first page starting at 1.

For example:

I call the "static_content" template from within the <fo:page-sequence>
element ...

    <fo:page-sequence master-name="chapter"
                      initial-page-number="auto">
        <xsl:call-template name="static_content" />
        <fo:flow flow-name="xsl-region-body">
            <xsl:apply-templates select="./section" />
        </fo:flow>
    </fo:page-sequence>

and then, within the "static_content" template, I use <fo:page-number /> to
generate the page number ...

    <fo:static-content flow-name="odd_footer">
        <fo:table>
            <fo:table-column column-width="3.5in" />
            <fo:table-column column-width="2.5in" />
            <fo:table-column column-width="1.0in" />
            <fo:table-body font-family="sans-serif"
                           font-size="9pt"
                           font-weight="200">
                <fo:table-row>
                    <fo:table-cell>
                       <fo:block text-align="start">
                           <xsl:value-of select="./sectionTitle" />
                       </fo:block>
                    </fo:table-cell>
                    <fo:table-cell>
                        <fo:block text-align="end">
                            <fo:page-number />
                        </fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>
    </fo:static-content>

Does anyone know what I'm doing wrong or how I can obtain sequential page
numbers when using more than one <fo:page-sequence>?

I'm using FOP version 0.19 for the FO-to-PDF conversion.

Thanks,

Drew Hodge
Technical Writer
(613) 270 3652
drew.hodge@xxxxxxxxxxx
www.entrust.com

Entrust(R)
Securing the Internet

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent