Re: [xep-support] Customized Page Numbering

From: G. Ken Holman <>
Date: Fri Jan 22 2010 - 16:04:41 PST

At 2010-01-22 15:38 -0500, Harvey, Paul wrote:
>We need to have a page numbering scheme, something like
>Section 1-1...Section 1-5
>Section 2-1...Section 2-3
>Pages numbers in the body and TOC need to be formatted this way.
>I know I can use initial-page-number in fo:page-sequence, to restart the
>page numbering for each section.

There are two ways, illustrated assuming your current node is a
section element that is creating the page-sequence:

(1) - just format the page number in the static content block itself,
though you have to repeat this logic in any page number citations:

<fo:block text-align='center'>Section

(2) - define a folio prefix, which is better because this is
reflected in any page number citations into the page-sequence:

<fo:folio-prefix>Section <xsl:number/>-</fo:folio-prefix>

>Is there anything built-in to allow me
>to customize the format as I need to, or do I need to take care of that

You need to take care of that yourself by formatting the appearance
of text before and after the page number, either in each case or
using the built-in folio-prefix facility.

Note that the page number itself can be formatted using format
tokens, but you cannot do arithmetic with or manipulate the page
number in any way.

I hope this helps.

. . . . . . . . . . . . Ken

UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:
Crane Softwrights Ltd.
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:
Video overview:
G. Ken Holman       
Male Cancer Awareness Nov'07
Legal business disclaimers:
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Fri Jan 22 16:18:14 2010

This archive was generated by hypermail 2.1.8 : Fri Jan 22 2010 - 16:18:21 PST