xsl-list
[Top] [All Lists]

Re: [xsl] Strategies for complex page numbering in PDF's.

2011-02-01 18:17:41
On Tue, February 1, 2011 3:38 pm, Dan Haley wrote:
...
What I need to do is be able to change the page numbering after the
998'th page. Using my chapter 2000 with 1,002 pages example, the
numbering should be:

2997, 2998, 2998.1, 2998.2, 2998.3, 2998.4.
...
Does anyone have any suggestions on strategies I can use to accomplish
this? I thought I read somewhere that I could use a maximum-repeats
attribute in the page-sequence-master element (like
maximum-repeats="998") and then use a different master page, but I have
no idea how to do that.

That would almost work, if only "format" was applicable to
fo:simple-page-master or fo:repeatable-page-master-reference, etc.

What you'd want to do, but cannot do, is follow
<fo:repeatable-page-master-reference maximum-repeats="998"
master-reference="..."/> with another fo:repeatable-page-master-reference
that set the folio prefix to '2998.' and set the page number format to
number pages from 1 again.

However, fo:folio-prefix and the number to string conversion properties
(format, grouping-separator, grouping-size, letter-value, country, and
language) apply to the fo:page-sequence, and you're not changing page
sequences at that point.

If the master-name makes it into the RenderX intermediate format for a
page you could, however, use "maximum-repeats" and change to a page master
with a different name after 998 pages and use that as the trigger for your
page number munging in the intermediate file.

There is a XSL FO 2.0 requirement for (more) inheritance down the area
tree [1] that may help, but that is not yet part of Design Notes for
Extensible Stylesheet Language (XSL) 2.0 [2].

Regards,


Tony Graham                         
Tony(_dot_)Graham(_at_)MenteithConsulting(_dot_)com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

[1] http://www.w3.org/TR/xslfo20-req/#N66748
[2] http://www.w3.org/TR/xslfo20/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>