473,396 Members | 1,812 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,396 software developers and data experts.

XSL-FO Page Numbering

2
I need help generating a PDF output where the page numbering restarts at 1 with every new chapter in a document. So the output would look something like 1-1, 1-2, 1-3,..., 2-1, 2-2, 2-3,...

I'm able to capture the chapter number and generate the "1-"; however, all my attempts generate consecutive page numbering (1-1, 1-2, 1-3, 2-4, 2-5, ...).

I suspect I'm not doing something correctly in setting up either the fo:page-sequence-master or the fo:page-sequence.

Could someone please enlighten me with some general guidance?

Thanks.

Craig
Oct 9 '08 #1
2 4320
Dormilich
8,658 Expert Mod 8TB
I've not yet worked with xsl-fo but a quick look at the specs hint that maybe the formatting-properties (CSS) can help you there. especially this one.

regards
Oct 9 '08 #2
booher
2
Thanks for the suggestion. I'm already familiar with initial-page-number. My challenge is trying to reset the number for each new chapter. My fo:page-sequence looks like this:

<fo:page-sequence master-reference="body-page" initial-page-number="1" force-page-count="even" >

<fo:static-content flow-name="odd-before">
<xsl:call-template name="odd-header-content"/>
</fo:static-content>
<fo:static-content flow-name="even-before">
<xsl:call-template name="even-header-content"/>
</fo:static-content>
<fo:static-content flow-name="odd-after">
<xsl:call-template name="odd-footer-content"/>
</fo:static-content>
<fo:static-content flow-name="even-after">
<xsl:call-template name="even-footer-content"/>
</fo:static-content>

<fo:flow flow-name="xsl-region-body" font-size="10pt" >

<xsl:apply-templates select="dita/topic[@audience != $att_suppress or not(@audience)]"/>

</fo:flow>
</fo:page-sequence>

But, this creates one long continuous sequence of pages. How do I restart page numbering for each new chapter?

Craig
Oct 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jean-Christophe Michel | last post by:
Hi, In a complex merging of two (non ordered) xml files i need to keep track of the elements of the second tree that were already merged with first tree, to copy only unused elements at the end....
1
by: Philip | last post by:
Hi, I am trying to output certain nodes inside another. I have an xml template with field definitions for a form, and this includes textfields, labels, checkboxes etc plus fieldssets. I defined...
8
by: Sebastian Kerekes | last post by:
Greetings, I'm developing an application that supports multiple languages. In my XSL I use variables to place the text where it belongs to. At the top of the document I include those variables -...
0
by: Jimmy | last post by:
Hi, I have a (multi-tier) XML document and a XSL transform file (that is meant to transform the XML into a flat structure so I can insert the data into a database table). I have reached a...
1
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
11
by: Rolf Barbakken | last post by:
I have an xml with records like this one: <a:response> <a:href>http://server/public/sol/comp/1049306.eml</a:href> <a:propstat> <a:status>HTTP/1.1 200 OK</a:status> <a:prop>...
6
by: Mark Miller | last post by:
I have a scheduled job that uses different XSL templates to transform XML and save it to disk. I am having problems with the code below. The problem shows up on both my development machine (Windows...
6
by: dave | last post by:
I really have 2 questions regarding the following xml snippet. The xml is a directory representation. <?xml version="1.0" standalone="yes"?> <FileSystem> <Row> <ID>1</ID> <Name>Root</Name>...
1
by: sommarlov | last post by:
Hi everyone >From one of our systems an xml file is produced. I need to validate this file before we send it to an external system for a very lenghty process. I cannot change the xml file layout....
2
by: shapper | last post by:
Hello, I am for days trying to apply a XSL transformation to a XML file and display the result in a the browser. I am using Asp.Net 2.0. Please, could someone post just a simple code example,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.