You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by ne...@swisslab.de on 2005/07/05 12:08:54 UTC

page-number

Hello List!

I want to get my page numbers formated in a, b, c format, not as it is by
default 1, 2, 3.
Is this possible? And if yes, how :)

Thanks!

Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: page-number

Posted by Jay Bryant <ja...@bryantcs.com>.
> Hello List!
>
> I want to get my page numbers formated in a, b, c format, not as it is by
> default 1, 2, 3.
> Is this possible? And if yes, how :)
>
> Thanks!
>
> Jan

Hi, Jan,

It's possible in XSL. There are a number of ways to do it. Here's one:

<fo:page-sequence master-reference="contents" initial-page-number="1"
format="i">

I use that line in my FO files that have tables of contents. That way, I get
lower-case Roman numerals in the tables of contents. You can get a, b, c...
instead of i, ii, iii... by using format="a" rather than format="i".

This assumes that FOP supports this feature of XSL. Also, note that this
feature is defined in the XSLT specification, since it's a transformation.
The relevant chunk of the specification is 7.7.1 Number to String Conversion
Attribute

The FOP compliance page says the format property has not been implemented.
See http://xml.apache.org/fop/compliance.html#fo-property-format

However, converting to Roman numerals is a type of number-to-string
conversion (as defined by both the spec and common sense), and that works.

So try format="a"

Jay Bryant
Bryant Communication Services



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org