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 Theresa Jayne Forster <th...@inbrand.co.uk> on 2011/08/30 15:49:32 UTC

pagenumbering

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as page 1
not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer



 


Re: pagenumbering

Posted by "Christopher R. Maden" <cr...@maden.org>.
On 08/30/2011 11:24 AM, Theresa Jayne Forster wrote:
> So, If I have it right, I need to set up 2 page-sequences one with
> the cover and one with the rest,
> 
> And I need to set the page number at 1 for the second one,
> 
> Reading through the links you gave appear to show that you cannot set
> a pagenumber of 0
> 
> <quote>A positive integer. If a non-positive or non-integer value is
> provided, the value will be rounded to the nearest integer value
> greater than or equal to 1.</quote>
> 
> So something like
> 
> <fo:simple-page-master master-name="Front Page”>
> 
> <fo:simple-page-master master-name="free-text-odd" >
> 
> <fo:simple-page-master master-name="free-text-even" >
> 
> <fo:page-sequence-master master-name="Contents">
> 
> <fo:page-sequence-master master-name="Free Text-"
> initial-page-number=”1”>

Almost.  The initial-page-number goes on the actual fo:page-sequence
that uses the page-sequence-master.

BTW, while those master-names are legal, having spaces in them makes
them prone to breakage from line-wrapping or other oddities; single
tokens are good practice, though not required.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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


RE: pagenumbering

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
So, If I have it right, I need to set up 2 page-sequences one with the cover and one with the rest, 

And I need to set the page number at 1 for the second one,

Reading through the links you gave appear to show that you cannot set a pagenumber of 0 

<quote>A positive integer. If a non-positive or non-integer value is provided, the value will be rounded to the nearest integer value greater than or equal to 1.</quote>

 

So something like 

 

<fo:simple-page-master master-name="Front Page”>

            <fo:region-body region-name="xsl-region-body-front" />

            <fo:region-before region-name="xsl-region-before-front" />

</fo:simple-page-master>

 

<fo:simple-page-master master-name="free-text-odd" >

            <fo:region-body region-name="xsl-region-body" column-count="2" column-gap="4mm" />

            <fo:region-after region-name="free-text-after-odd" />

            <fo:region-before region-name="free-text-before-odd"/>

</fo:simple-page-master>

 

<fo:simple-page-master master-name="free-text-even" >

            <fo:region-body region-name="xsl-region-body" column-count="2" column-gap="4mm" />

            <fo:region-after region-name="free-text-after-even" />

            <fo:region-before region-name="free-text-before-even" />

</fo:simple-page-master>

 

<fo:page-sequence-master master-name="Contents">

<fo:repeatable-page-master-alternatives>

                        <fo:conditional-page-master-reference master-reference="Front Page"/>

            </fo:repeatable-page-master-alternatives>

</fo:page-sequence-master>   

                                                

<fo:page-sequence-master master-name="Free Text-" initial-page-number=”1”>

            <fo:repeatable-page-master-alternatives>

                        <fo:conditional-page-master-reference master-reference="free-text-even" odd-or-even="even"/>

                        <fo:conditional-page-master-reference master-reference="free-text-odd"  odd-or-even="odd"/>

            </fo:repeatable-page-master-alternatives>

</fo:page-sequence-master>

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: 30 August 2011 15:52
To: fop-users@xmlgraphics.apache.org
Subject: Re: pagenumbering

 

actually, this is an FO issue, not XSL, since it is FOP that generates page numbers via <fo:page-number>

 

the correct answer is that you need to use the initial-page-number property on fo:page-sequence to specify a different starting number than is generated by "auto";

 

see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number and and http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for details;

 

regards,

glenn

On Tue, Aug 30, 2011 at 8:36 AM, Christopher R. Maden <cr...@maden.org> wrote:

On 08/30/2011 09:49 AM, Theresa Jayne Forster wrote:
> I was wondering, how can you change the page numbering on
> page-number-citation stuff,
>
> We have the requirement of numbering starting on the inside cover as
> page 1 not page 2 as currently the front page is classed as page 1.
>
> Is there any way to make the numbering start from 1 on the inside of
> the front cover?

[This is really an XSL question, not a FOP-specific question.]

The thing to change is not the page-number-citation, but the page number
itself.  Make the inside cover start a new page-sequence, starting its
number from 1.  Simple! (-:

~Chris
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11


Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,

as you said, XSL is separated in 2 things:
 - XML transformation (namespace http://www.w3.org/1999/XSL/Transform)
 - Formating objects (namespace http://www.w3.org/1999/XSL/Format)

using the same name for this 2 separate things is quite unclear, so in
FOP lists we speak about either XSLT (about the former), or XSL-FO
(about the latter).

It is mainly for convenience that we use here these 2 short words: XSLT
Vs XSL-FO

What FOP engine takes as input is XSL-FO (tags <fo:xxx>), so it is
important to understand the difference between the 2 above.

Why XSL project splitted into 2 subprojects is out of topic here.

Le 31/08/2011 06:09, Christopher R. Maden a écrit :
> On 08/30/2011 11:41 PM, Glenn Adams wrote:
>> We may be applying different ontological models here.
> 
> That does seem likely, since...
> 
>> I label anything having to do with XSL-FO as FO related.
>>
>> I label anything having to do with XSLT as XSL related.
>>
>> For me, FO related != XSL related.
> 
> The XSL-FO language is defined in <URL: http://www.w3.org/TR/xsl/ >,
> “Extensible Stylesheet Language (XSL).”  Early drafts did not even
> separate the transformation and formatting parts of XSL, but since the
> transformation was so useful on its own, it was spun out.  However,
> formatting was the primary goal of the XSL work.  IOW, FO *is* XSL. XSLT
> is a by-product, but is often (mistakenly) called “XSL.”
> 
>> Because FOP supports both XSL(T) [indirectly} and FO, it certainly
>> covers both areas, but as far as I'm concerned the XSL(T) portion of
>> it is a convenience function, unrelated to its core functionality.
> 
> I concur with that... it is now clear that the only confusion is whether
> or not FO is part of XSL; I hope the title of the W3C Recommendation
> defining it clarifies that.
> 
> [Argumentum ad verecundiam: I was on the W3C XSL Working Group from its
> inception in 1997 until 2002.]
> 
> It is also quite clear at <URL:
> http://www.mulberrytech.com/xsl/xsl-list/#introduction > that XSL-FO is
> in scope for that list.
> 
> I wouldn’t and can’t stop anyone from posting questions about FO here.
> However, I will try, in my answers, to make clear whether their
> questions pertain to FOP behavior or whether they would have the same
> questions regardless of which tool they were using.
> 
> ~Chris

-- 
Pascal

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


Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by "Christopher R. Maden" <cr...@maden.org>.
On 08/30/2011 11:41 PM, Glenn Adams wrote:
> We may be applying different ontological models here.

That does seem likely, since...

> I label anything having to do with XSL-FO as FO related.
> 
> I label anything having to do with XSLT as XSL related.
> 
> For me, FO related != XSL related.

The XSL-FO language is defined in <URL: http://www.w3.org/TR/xsl/ >,
“Extensible Stylesheet Language (XSL).”  Early drafts did not even
separate the transformation and formatting parts of XSL, but since the
transformation was so useful on its own, it was spun out.  However,
formatting was the primary goal of the XSL work.  IOW, FO *is* XSL. XSLT
is a by-product, but is often (mistakenly) called “XSL.”

> Because FOP supports both XSL(T) [indirectly} and FO, it certainly
> covers both areas, but as far as I'm concerned the XSL(T) portion of
> it is a convenience function, unrelated to its core functionality.

I concur with that... it is now clear that the only confusion is whether
or not FO is part of XSL; I hope the title of the W3C Recommendation
defining it clarifies that.

[Argumentum ad verecundiam: I was on the W3C XSL Working Group from its
inception in 1997 until 2002.]

It is also quite clear at <URL:
http://www.mulberrytech.com/xsl/xsl-list/#introduction > that XSL-FO is
in scope for that list.

I wouldn’t and can’t stop anyone from posting questions about FO here.
However, I will try, in my answers, to make clear whether their
questions pertain to FOP behavior or whether they would have the same
questions regardless of which tool they were using.

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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


Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by Glenn Adams <gl...@skynav.com>.
s/the publishing of XSL 1.0/the publishing of XSL-FO 1.0/

On Wed, Aug 31, 2011 at 10:19 AM, Glenn Adams <gl...@skynav.com> wrote:

> I completely agree with the last sentence in your email. When I talk about
> "mis-spending" time, I am referring to discussions about the process of
> creating a valid XSLFO file. However, that is just my opinion. Someone else
> made the decision to include the XML via XSLT to XSLFO process in FOP, so we
> have to live with that. But since that is just a convenience function in
> FOP, and not an aspect of the core engine of FOP, I find discussions of the
> XML via XSTL to XSLFO process to be a distraction from the core features of
> FOP. If it had been my decision, I would not have included that convenience
> function in FOP, but that's irrelevant at this point.
>
> G.
>
> P.S. Though I wasn't a member of the XSL WG, I was an active participant of
> the XSL-FO subgroup from the time of its inauguration to the publishing of
> XSL 1.0. Prior to that I was an active participant in ISO SC18/WG8 in
> developing ISO/IEC 10179 Document Style Semantics and Specification Language
> (DSSSL), which was the logical precursor to both XSLT and XSL-FO. Indeed, I
> was an early proponent of separating the transformation and formatting
> aspects of DSSSL that was eventually translated into separate XSLT and
> XSL-FO specs.
>
>
> On Wed, Aug 31, 2011 at 6:36 AM, Eric Douglas <ed...@blockhouse.com>wrote:
>
>> **
>> Once someone has valid XSLFO and they're not getting the expected output
>> then it's an FOP question.
>>
>>  ------------------------------
>> *From:* Glenn Adams [mailto:glenn@skynav.com]
>> *Sent:* Tuesday, August 30, 2011 11:41 PM
>> *To:* fop-users@xmlgraphics.apache.org
>> *Subject:* Re: XSL vs. FOP [was: Re: pagenumbering]
>>
>> Christopher,
>>
>> We may be applying different ontological models here.
>>
>> I label anything having to do with XSL-FO as FO related.
>>
>> I label anything having to do with XSLT as XSL related.
>>
>> For me, FO related != XSL related.
>>
>> In fact, there is no necessary logical connection between the two, except
>> insofar as FO borrows/reuses certain constructs from XSL(T), the only one of
>> which I know of is the number to string conversion properties, which,
>> coincidentally, have to do with the current subject matter: page number
>> generation.
>>
>> In any case, by model, page number properties are FO related, not XSL
>> related.
>>
>> Because FOP supports both XSL(T) [indirectly} and FO, it certainly covers
>> both areas, but as far as I'm concerned the XSL(T) portion of it is a
>> convenience function, unrelated to its core functionality.
>>
>> Given the amount of traffic (mis)spent on issues related to the XSL(T)
>> features of FOP, I often wish it did not support this convenience function.
>> But that's neither here nor there.
>>
>> G.
>>
>> On Tue, Aug 30, 2011 at 9:12 AM, Christopher R. Maden <cr...@maden.org>wrote:
>>
>>> On 08/30/2011 10:52 AM, Glenn Adams wrote:
>>> > actually, this is an FO issue, not XSL, since it is FOP that
>>> > generates page numbers via <fo:page-number>
>>>
>>> XSL encompasses both Formatting Objects (sometimes “XSL-FO”) and XSL
>>> Tranformations (XSLT).  An FO issue *is* an XSL issue.
>>>
>>> It is FOP that generates page numbers, but what Theresa needed was the
>>> FO instruction, which is agnostic about the software that consumes it
>>> (whether FOP, RenderX, Antenna House, or anything else).
>>>
>>> The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >) covers
>>> all of XSL, including XSL-FO.
>>>
>>> We’ve previously had discussions on this list about allowing XML+XSLT as
>>> input to FOP, and the potential user confusion that results as to what
>>> FOP actually does.  For similar reasons, when I reply to questions here,
>>> I try to make it clear what parts are specific to FOP, and which
>>> questions are about XML, XSLT, or FO, and orthogonal to FOP’s operation
>>> specifically.
>>>
>>> > the correct answer is that you need to use the initial-page-number
>>> > property on fo:page-sequence to specify a different starting number
>>> > than is generated by "auto";
>>> >
>>> > see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
>>> > and and
>>> > http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for
>>> > details;
>>>
>>> Yes, and I apologize for not taking the time to look up the references
>>> that Theresa needs.
>>>
>>> ~Chris
>>>
>>> [Emotional content notice (since plain text is really bad at
>>> communicating this): I want to be very clear that I am not attacking or
>>> criticizing Glenn or Theresa.  And certainly, I’ve known Glenn by his
>>> work for far too long to accuse him of anything remotely resembling
>>> ignorance.  I have simply attempted to be somewhat detailed and pedantic
>>> here for maximal clarity to everyone who might read this.]
>>> --
>>> Chris Maden, text nerd  <URL: http://crism.maden.org/ >
>>> “The present tendency and drift towards the Police State gives all
>>>  free Americans pause.” — Alabama Supreme Court, 1955
>>>  (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
>>>
>>
>

Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by Glenn Adams <gl...@skynav.com>.
I completely agree with the last sentence in your email. When I talk about
"mis-spending" time, I am referring to discussions about the process of
creating a valid XSLFO file. However, that is just my opinion. Someone else
made the decision to include the XML via XSLT to XSLFO process in FOP, so we
have to live with that. But since that is just a convenience function in
FOP, and not an aspect of the core engine of FOP, I find discussions of the
XML via XSTL to XSLFO process to be a distraction from the core features of
FOP. If it had been my decision, I would not have included that convenience
function in FOP, but that's irrelevant at this point.

G.

P.S. Though I wasn't a member of the XSL WG, I was an active participant of
the XSL-FO subgroup from the time of its inauguration to the publishing of
XSL 1.0. Prior to that I was an active participant in ISO SC18/WG8 in
developing ISO/IEC 10179 Document Style Semantics and Specification Language
(DSSSL), which was the logical precursor to both XSLT and XSL-FO. Indeed, I
was an early proponent of separating the transformation and formatting
aspects of DSSSL that was eventually translated into separate XSLT and
XSL-FO specs.

On Wed, Aug 31, 2011 at 6:36 AM, Eric Douglas <ed...@blockhouse.com>wrote:

> **
> Once someone has valid XSLFO and they're not getting the expected output
> then it's an FOP question.
>
>  ------------------------------
> *From:* Glenn Adams [mailto:glenn@skynav.com]
> *Sent:* Tuesday, August 30, 2011 11:41 PM
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: XSL vs. FOP [was: Re: pagenumbering]
>
> Christopher,
>
> We may be applying different ontological models here.
>
> I label anything having to do with XSL-FO as FO related.
>
> I label anything having to do with XSLT as XSL related.
>
> For me, FO related != XSL related.
>
> In fact, there is no necessary logical connection between the two, except
> insofar as FO borrows/reuses certain constructs from XSL(T), the only one of
> which I know of is the number to string conversion properties, which,
> coincidentally, have to do with the current subject matter: page number
> generation.
>
> In any case, by model, page number properties are FO related, not XSL
> related.
>
> Because FOP supports both XSL(T) [indirectly} and FO, it certainly covers
> both areas, but as far as I'm concerned the XSL(T) portion of it is a
> convenience function, unrelated to its core functionality.
>
> Given the amount of traffic (mis)spent on issues related to the XSL(T)
> features of FOP, I often wish it did not support this convenience function.
> But that's neither here nor there.
>
> G.
>
> On Tue, Aug 30, 2011 at 9:12 AM, Christopher R. Maden <cr...@maden.org>wrote:
>
>> On 08/30/2011 10:52 AM, Glenn Adams wrote:
>> > actually, this is an FO issue, not XSL, since it is FOP that
>> > generates page numbers via <fo:page-number>
>>
>> XSL encompasses both Formatting Objects (sometimes “XSL-FO”) and XSL
>> Tranformations (XSLT).  An FO issue *is* an XSL issue.
>>
>> It is FOP that generates page numbers, but what Theresa needed was the
>> FO instruction, which is agnostic about the software that consumes it
>> (whether FOP, RenderX, Antenna House, or anything else).
>>
>> The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >) covers
>> all of XSL, including XSL-FO.
>>
>> We’ve previously had discussions on this list about allowing XML+XSLT as
>> input to FOP, and the potential user confusion that results as to what
>> FOP actually does.  For similar reasons, when I reply to questions here,
>> I try to make it clear what parts are specific to FOP, and which
>> questions are about XML, XSLT, or FO, and orthogonal to FOP’s operation
>> specifically.
>>
>> > the correct answer is that you need to use the initial-page-number
>> > property on fo:page-sequence to specify a different starting number
>> > than is generated by "auto";
>> >
>> > see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
>> > and and
>> > http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for
>> > details;
>>
>> Yes, and I apologize for not taking the time to look up the references
>> that Theresa needs.
>>
>> ~Chris
>>
>> [Emotional content notice (since plain text is really bad at
>> communicating this): I want to be very clear that I am not attacking or
>> criticizing Glenn or Theresa.  And certainly, I’ve known Glenn by his
>> work for far too long to accuse him of anything remotely resembling
>> ignorance.  I have simply attempted to be somewhat detailed and pedantic
>> here for maximal clarity to everyone who might read this.]
>> --
>> Chris Maden, text nerd  <URL: http://crism.maden.org/ >
>> “The present tendency and drift towards the Police State gives all
>>  free Americans pause.” — Alabama Supreme Court, 1955
>>  (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>

Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi Eric,

Le 31/08/2011 14:36, Eric Douglas a écrit :
> XSLFO is what you get when you combine XSLT with XML.
This is incomplete:
XML+XSLT can give (via xsl:output/@method attribute):
 - XML (among what XSL-FO is, but not only)
 - HTML (a SGML DTD)
 - TEXT

> XSLFO is an extension of XSLT and includes XSLT commands.
definitively not, but:
XML allows to mix different namespaces, this is how you can transform
XML from various DTD (for example: docbook) into other DTD (for example:
XHTML, XSL-FO).

-- 
Pascal

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


RE: XSL vs. FOP [was: Re: pagenumbering]

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
And my question was about the FO <fo:page-number/> tag therefore a FOP
question 

Ie how do I get the output I need when using the tag..

 

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Eric Douglas [mailto:edouglas@blockhouse.com] 
Sent: 31 August 2011 13:37
To: fop-users@xmlgraphics.apache.org
Subject: RE: XSL vs. FOP [was: Re: pagenumbering]

 

XSLFO is what you get when you combine XSLT with XML.

XSLFO is an extension of XSLT and includes XSLT commands.

XSLFO is as unrelated to FOP as XSLT when you're talking about it's creation
for expected output.

If you want only FOP related questions they should be about XSLFO commands
and only as far as whether they're supported and whether they're producing
the expected output.

There is likely a better place for questions about how to generate XSLT or
XSLFO which should produce particular output which don't question whether
FOP is processing it correctly, and you're welcome to point people to such a
place if you don't have an answer or don't feel like answering, though I
personally wouldn't mind helping if I do have an answer.

 

I use FOP with XML + XSLT with embedded code.  I have had some issues with
how FOP works which require looking at the XSLFO, so I actually split the
process so I call the Java transform method twice.  One passes the XSL on
the Transformer create and the XML as input and the output is XSLFO I can
write to a file if I need.  The second transform uses no XSL and passes the
XSLFO as input and the FOP handler on the output.

 

If you don't want to 'misspend' any time answering questions that should
include questions about how to write XSLT or XSLFO.  Once someone has valid
XSLFO and they're not getting the expected output then it's an FOP question.

 

  _____  

From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: Tuesday, August 30, 2011 11:41 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: XSL vs. FOP [was: Re: pagenumbering]

Christopher, 

 

We may be applying different ontological models here. 

 

I label anything having to do with XSL-FO as FO related.

 

I label anything having to do with XSLT as XSL related.

 

For me, FO related != XSL related.

 

In fact, there is no necessary logical connection between the two, except
insofar as FO borrows/reuses certain constructs from XSL(T), the only one of
which I know of is the number to string conversion properties, which,
coincidentally, have to do with the current subject matter: page number
generation.

 

In any case, by model, page number properties are FO related, not XSL
related.

 

Because FOP supports both XSL(T) [indirectly} and FO, it certainly covers
both areas, but as far as I'm concerned the XSL(T) portion of it is a
convenience function, unrelated to its core functionality.

 

Given the amount of traffic (mis)spent on issues related to the XSL(T)
features of FOP, I often wish it did not support this convenience function.
But that's neither here nor there.

 

G.

On Tue, Aug 30, 2011 at 9:12 AM, Christopher R. Maden <cr...@maden.org>
wrote:

On 08/30/2011 10:52 AM, Glenn Adams wrote:
> actually, this is an FO issue, not XSL, since it is FOP that
> generates page numbers via <fo:page-number>

XSL encompasses both Formatting Objects (sometimes "XSL-FO") and XSL
Tranformations (XSLT).  An FO issue *is* an XSL issue.

It is FOP that generates page numbers, but what Theresa needed was the
FO instruction, which is agnostic about the software that consumes it
(whether FOP, RenderX, Antenna House, or anything else).

The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >) covers
all of XSL, including XSL-FO.

We've previously had discussions on this list about allowing XML+XSLT as
input to FOP, and the potential user confusion that results as to what
FOP actually does.  For similar reasons, when I reply to questions here,
I try to make it clear what parts are specific to FOP, and which
questions are about XML, XSLT, or FO, and orthogonal to FOP's operation
specifically.

> the correct answer is that you need to use the initial-page-number
> property on fo:page-sequence to specify a different starting number
> than is generated by "auto";
>
> see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
> and and
> http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for
> details;

Yes, and I apologize for not taking the time to look up the references
that Theresa needs.

~Chris

[Emotional content notice (since plain text is really bad at
communicating this): I want to be very clear that I am not attacking or
criticizing Glenn or Theresa.  And certainly, I've known Glenn by his
work for far too long to accuse him of anything remotely resembling
ignorance.  I have simply attempted to be somewhat detailed and pedantic
here for maximal clarity to everyone who might read this.]
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
"The present tendency and drift towards the Police State gives all
 free Americans pause.." - Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11


RE: XSL vs. FOP [was: Re: pagenumbering]

Posted by Eric Douglas <ed...@blockhouse.com>.
XSLFO is what you get when you combine XSLT with XML.
XSLFO is an extension of XSLT and includes XSLT commands.
XSLFO is as unrelated to FOP as XSLT when you're talking about it's
creation for expected output.
If you want only FOP related questions they should be about XSLFO
commands and only as far as whether they're supported and whether
they're producing the expected output.
There is likely a better place for questions about how to generate XSLT
or XSLFO which should produce particular output which don't question
whether FOP is processing it correctly, and you're welcome to point
people to such a place if you don't have an answer or don't feel like
answering, though I personally wouldn't mind helping if I do have an
answer.
 
I use FOP with XML + XSLT with embedded code.  I have had some issues
with how FOP works which require looking at the XSLFO, so I actually
split the process so I call the Java transform method twice.  One passes
the XSL on the Transformer create and the XML as input and the output is
XSLFO I can write to a file if I need.  The second transform uses no XSL
and passes the XSLFO as input and the FOP handler on the output.
 
If you don't want to 'misspend' any time answering questions that should
include questions about how to write XSLT or XSLFO.  Once someone has
valid XSLFO and they're not getting the expected output then it's an FOP
question.

________________________________

From: Glenn Adams [mailto:glenn@skynav.com] 
Sent: Tuesday, August 30, 2011 11:41 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: XSL vs. FOP [was: Re: pagenumbering]


Christopher, 

We may be applying different ontological models here. 

I label anything having to do with XSL-FO as FO related.

I label anything having to do with XSLT as XSL related.

For me, FO related != XSL related.

In fact, there is no necessary logical connection between the two,
except insofar as FO borrows/reuses certain constructs from XSL(T), the
only one of which I know of is the number to string conversion
properties, which, coincidentally, have to do with the current subject
matter: page number generation.

In any case, by model, page number properties are FO related, not XSL
related.

Because FOP supports both XSL(T) [indirectly} and FO, it certainly
covers both areas, but as far as I'm concerned the XSL(T) portion of it
is a convenience function, unrelated to its core functionality.

Given the amount of traffic (mis)spent on issues related to the XSL(T)
features of FOP, I often wish it did not support this convenience
function. But that's neither here nor there.

G.


On Tue, Aug 30, 2011 at 9:12 AM, Christopher R. Maden <cr...@maden.org>
wrote:


	On 08/30/2011 10:52 AM, Glenn Adams wrote:
	> actually, this is an FO issue, not XSL, since it is FOP that
	> generates page numbers via <fo:page-number>
	
	XSL encompasses both Formatting Objects (sometimes "XSL-FO") and
XSL
	Tranformations (XSLT).  An FO issue *is* an XSL issue.
	
	It is FOP that generates page numbers, but what Theresa needed
was the
	FO instruction, which is agnostic about the software that
consumes it
	(whether FOP, RenderX, Antenna House, or anything else).
	
	The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >)
covers
	all of XSL, including XSL-FO.
	
	We've previously had discussions on this list about allowing
XML+XSLT as
	input to FOP, and the potential user confusion that results as
to what
	FOP actually does.  For similar reasons, when I reply to
questions here,
	I try to make it clear what parts are specific to FOP, and which
	questions are about XML, XSLT, or FO, and orthogonal to FOP's
operation
	specifically.
	
	> the correct answer is that you need to use the
initial-page-number
	> property on fo:page-sequence to specify a different starting
number
	> than is generated by "auto";
	>
	> see
http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
	> and and
	> http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence
for
	> details;
	
	Yes, and I apologize for not taking the time to look up the
references
	that Theresa needs.
	
	~Chris
	
	[Emotional content notice (since plain text is really bad at
	communicating this): I want to be very clear that I am not
attacking or
	criticizing Glenn or Theresa.  And certainly, I've known Glenn
by his
	work for far too long to accuse him of anything remotely
resembling
	ignorance.  I have simply attempted to be somewhat detailed and
pedantic
	here for maximal clarity to everyone who might read this.]
	--
	Chris Maden, text nerd  <URL: http://crism.maden.org/ >
	"The present tendency and drift towards the Police State gives
all
	 free Americans pause." - Alabama Supreme Court, 1955
	 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)
	
	
---------------------------------------------------------------------
	To unsubscribe, e-mail:
fop-users-unsubscribe@xmlgraphics.apache.org
	For additional commands, e-mail:
fop-users-help@xmlgraphics.apache.org
	
	



Re: XSL vs. FOP [was: Re: pagenumbering]

Posted by Glenn Adams <gl...@skynav.com>.
Christopher,

We may be applying different ontological models here.

I label anything having to do with XSL-FO as FO related.

I label anything having to do with XSLT as XSL related.

For me, FO related != XSL related.

In fact, there is no necessary logical connection between the two, except
insofar as FO borrows/reuses certain constructs from XSL(T), the only one of
which I know of is the number to string conversion properties, which,
coincidentally, have to do with the current subject matter: page number
generation.

In any case, by model, page number properties are FO related, not XSL
related.

Because FOP supports both XSL(T) [indirectly} and FO, it certainly covers
both areas, but as far as I'm concerned the XSL(T) portion of it is a
convenience function, unrelated to its core functionality.

Given the amount of traffic (mis)spent on issues related to the XSL(T)
features of FOP, I often wish it did not support this convenience function.
But that's neither here nor there.

G.

On Tue, Aug 30, 2011 at 9:12 AM, Christopher R. Maden <cr...@maden.org>wrote:

> On 08/30/2011 10:52 AM, Glenn Adams wrote:
> > actually, this is an FO issue, not XSL, since it is FOP that
> > generates page numbers via <fo:page-number>
>
> XSL encompasses both Formatting Objects (sometimes “XSL-FO”) and XSL
> Tranformations (XSLT).  An FO issue *is* an XSL issue.
>
> It is FOP that generates page numbers, but what Theresa needed was the
> FO instruction, which is agnostic about the software that consumes it
> (whether FOP, RenderX, Antenna House, or anything else).
>
> The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >) covers
> all of XSL, including XSL-FO.
>
> We’ve previously had discussions on this list about allowing XML+XSLT as
> input to FOP, and the potential user confusion that results as to what
> FOP actually does.  For similar reasons, when I reply to questions here,
> I try to make it clear what parts are specific to FOP, and which
> questions are about XML, XSLT, or FO, and orthogonal to FOP’s operation
> specifically.
>
> > the correct answer is that you need to use the initial-page-number
> > property on fo:page-sequence to specify a different starting number
> > than is generated by "auto";
> >
> > see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
> > and and
> > http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for
> > details;
>
> Yes, and I apologize for not taking the time to look up the references
> that Theresa needs.
>
> ~Chris
>
> [Emotional content notice (since plain text is really bad at
> communicating this): I want to be very clear that I am not attacking or
> criticizing Glenn or Theresa.  And certainly, I’ve known Glenn by his
> work for far too long to accuse him of anything remotely resembling
> ignorance.  I have simply attempted to be somewhat detailed and pedantic
> here for maximal clarity to everyone who might read this.]
> --
> Chris Maden, text nerd  <URL: http://crism.maden.org/ >
> “The present tendency and drift towards the Police State gives all
>  free Americans pause.” — Alabama Supreme Court, 1955
>  (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

XSL vs. FOP [was: Re: pagenumbering]

Posted by "Christopher R. Maden" <cr...@maden.org>.
On 08/30/2011 10:52 AM, Glenn Adams wrote:
> actually, this is an FO issue, not XSL, since it is FOP that
> generates page numbers via <fo:page-number>

XSL encompasses both Formatting Objects (sometimes “XSL-FO”) and XSL
Tranformations (XSLT).  An FO issue *is* an XSL issue.

It is FOP that generates page numbers, but what Theresa needed was the
FO instruction, which is agnostic about the software that consumes it
(whether FOP, RenderX, Antenna House, or anything else).

The XSL List (<URL: http://www.mulberrytech.com/xsl/xsl-list/ >) covers
all of XSL, including XSL-FO.

We’ve previously had discussions on this list about allowing XML+XSLT as
input to FOP, and the potential user confusion that results as to what
FOP actually does.  For similar reasons, when I reply to questions here,
I try to make it clear what parts are specific to FOP, and which
questions are about XML, XSLT, or FO, and orthogonal to FOP’s operation
specifically.

> the correct answer is that you need to use the initial-page-number
> property on fo:page-sequence to specify a different starting number
> than is generated by "auto";
> 
> see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number
> and and
> http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for 
> details;

Yes, and I apologize for not taking the time to look up the references
that Theresa needs.

~Chris

[Emotional content notice (since plain text is really bad at
communicating this): I want to be very clear that I am not attacking or
criticizing Glenn or Theresa.  And certainly, I’ve known Glenn by his
work for far too long to accuse him of anything remotely resembling
ignorance.  I have simply attempted to be somewhat detailed and pedantic
here for maximal clarity to everyone who might read this.]
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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


Re: pagenumbering

Posted by Glenn Adams <gl...@skynav.com>.
actually, this is an FO issue, not XSL, since it is FOP that generates page
numbers via <fo:page-number>

the correct answer is that you need to use the initial-page-number property
on fo:page-sequence to specify a different starting number than is generated
by "auto";

see http://www.w3.org/TR/2006/REC-xsl11-20061205/#initial-page-number and
and http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_page-sequence for
details;

regards,
glenn

On Tue, Aug 30, 2011 at 8:36 AM, Christopher R. Maden <cr...@maden.org>wrote:

> On 08/30/2011 09:49 AM, Theresa Jayne Forster wrote:
> > I was wondering, how can you change the page numbering on
> > page-number-citation stuff,
> >
> > We have the requirement of numbering starting on the inside cover as
> > page 1 not page 2 as currently the front page is classed as page 1.
> >
> > Is there any way to make the numbering start from 1 on the inside of
> > the front cover?
>
> [This is really an XSL question, not a FOP-specific question.]
>
> The thing to change is not the page-number-citation, but the page number
> itself.  Make the inside cover start a new page-sequence, starting its
> number from 1.  Simple! (-:
>
> ~Chris
> --
> Chris Maden, text nerd  <URL: http://crism.maden.org/ >
> “The present tendency and drift towards the Police State gives all
>  free Americans pause.” — Alabama Supreme Court, 1955
>  (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: pagenumbering

Posted by "Christopher R. Maden" <cr...@maden.org>.
On 08/30/2011 09:49 AM, Theresa Jayne Forster wrote:
> I was wondering, how can you change the page numbering on 
> page-number-citation stuff,
> 
> We have the requirement of numbering starting on the inside cover as
> page 1 not page 2 as currently the front page is classed as page 1.
> 
> Is there any way to make the numbering start from 1 on the inside of
> the front cover?

[This is really an XSL question, not a FOP-specific question.]

The thing to change is not the page-number-citation, but the page number
itself.  Make the inside cover start a new page-sequence, starting its
number from 1.  Simple! (-:

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“The present tendency and drift towards the Police State gives all
 free Americans pause.” — Alabama Supreme Court, 1955
 (Pike v. Southern Bell Tel. & Telegraph, 81 So.2d 254)

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


RE: pagenumbering

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Eric, That thought had crossed my mind, but we take a random amount of
formatted text from a CMS and pass it into FOP using a template, the output
however was doing the cover page as page 1 rather than the inside of the
cover, the answer I got was what I was looking for,

I had been looking at the page-number tag not the page-sequence tag and
initial-page-number tag, This in my opinion is FO as it is the input to FOP
without needing any XSLT. 

 

Thank you all who have assisted and while I think the discussion was
interesting, we should leave it for now, or risk upsetting the majority of
users on this list.

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Eric Douglas [mailto:edouglas@blockhouse.com] 
Sent: 31 August 2011 16:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering

 

I agree that discussion was petty.  If someone thought the question was off
topic they are welcome to respond with links to point you somewhere you
might get better answers or ignore the question.

While I haven't checked what other XSLFO processors exist, it seems the XSLT
and XSLFO specifications are both generic and unrelated to FOP.

If the question is about creating XSL in either form it may be technically
off topic, though I for one don't care.

If the question is about how FOP specifically interprets your XSLFO, or
about whether a feature is supported then it's most relevant.

 

I use FOP in a most unconventional way but I've stuck with it for 2 reasons
I can think of.

1) I don't know of any other free project which creates PDFs with all the
options FOP has.

2) FOP was initially recommended to us by a consultant and I've gotten it to
work so if it isn't broken there's no need to change.

If there is another PDF create project with all the features we need that
can create more efficiently we'll likely switch eventually.

FOP doesn't handle large transforms.  I tested creating a 1000 page PDF and
it ran out of memory, though the output is small and the input is reasonably
small.

I got around this bug by creating 1 page PDFs.  We generate our input
programmatically so we know what goes on each page, so I just broke it up.

I increment the page number on each PDF and just pass it in as a tag.

     <fo:page-sequence>
          <xsl:attribute
name="master-reference">STANDARD_PAGE</xsl:attribute>
          <xsl:attribute name="initial-page-number"><xsl:value-of
select="IPN"/></xsl:attribute>
Then I use pdfbox to mrge the resulting PDFs.

 

  _____  

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: Wednesday, August 31, 2011 9:41 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering

Thanks for the response but the question was already answered, but then a
petty discussion started about whether fo:page-number was FOP or XSLT

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer

From: Chen Yang [mailto:cyang@hrsg.ca] 
Sent: 31 August 2011 14:20
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering

 

Hey Theresa,

 

Not sure if this answer your question, 

 

I need to start the page 1 after cover page and Table of contents

 

<xsl:call-template name="insert_cover_page_template"/>

<xsl:call-template name="insert_bookmarks"/>

<xsl:call-template name="insert_table_of_contents_page_template"/>

 

Then I bought in my contents template

<xsl:call-template name="insert_contents_page_template"/>

 

Inside the insert_contents_page_template

 

<xsl:template name="insert_contents_page_template">

          <fo:page-sequence master-reference="A4-landscape"
initial-page-number="1" >  

                  <xsl:call-template name="insert_page_header-template"/> 

                  <xsl:call-template name="side_bar"/> 

                  <xsl:call-template name="insert_page_footer_template"/>

             <fo:flow  flow-name="xsl-region-body">

                      <xsl:apply-templates/>

                          <fo:block id="TheVeryLastPage"/>

             </fo:flow>   

          </fo:page-sequence>

</xsl:template>

 

Page number template 

 

  <!-- page number -->

  <xsl:template name="page_number">

     <fo:block-container absolute-position="absolute" top="5mm">

            <fo:block font-family="sans-serif" font-size="7pt"
text-align="right" color="black"     >

            Page <fo:page-number/> of <fo:page-number-citation
ref-id="TheVeryLastPage"/>

            </fo:block>

      </fo:block-container>

  </xsl:template>

 

 

Finally,Insert page number into footer template

 

      <!-- footer -->

    <xsl:template name="insert_page_footer_template">  

        <fo:static-content flow-name="xsl-region-after">   

                                

                        ..

                        .

                        ..     

      

              <xsl:call-template name="page_number"/>

            

        </fo:static-content>

</xsl:template>

 

Now the "Page 1 of X" will start on the first content page, not on my cover
page or table of contents page.

 

Regards 

 

Chen Yang

 

Programmer / Analyst

HRSG (Human Resource Systems Group)

6 Antares Drive,Phase II Suite 100

Ottawa, ON, K2E 8A9

 <tel:613-745-6605> Tel:        613-745-6605 x 254

Fax:        613-745-4019

Email:      <ma...@hrsg.ca> cyang@hrsg.ca

Web:        <http://www.hrsg.ca/> www.hrsg.ca

 

"Competency-based HR Solutions" 

 

 

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: August-30-11 9:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: pagenumbering

 

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as page 1
not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11


RE: pagenumbering

Posted by Eric Douglas <ed...@blockhouse.com>.
I agree that discussion was petty.  If someone thought the question was
off topic they are welcome to respond with links to point you somewhere
you might get better answers or ignore the question.
While I haven't checked what other XSLFO processors exist, it seems the
XSLT and XSLFO specifications are both generic and unrelated to FOP.
If the question is about creating XSL in either form it may be
technically off topic, though I for one don't care.
If the question is about how FOP specifically interprets your XSLFO, or
about whether a feature is supported then it's most relevant.
 
I use FOP in a most unconventional way but I've stuck with it for 2
reasons I can think of.
1) I don't know of any other free project which creates PDFs with all
the options FOP has.
2) FOP was initially recommended to us by a consultant and I've gotten
it to work so if it isn't broken there's no need to change.
If there is another PDF create project with all the features we need
that can create more efficiently we'll likely switch eventually.
FOP doesn't handle large transforms.  I tested creating a 1000 page PDF
and it ran out of memory, though the output is small and the input is
reasonably small.
I got around this bug by creating 1 page PDFs.  We generate our input
programmatically so we know what goes on each page, so I just broke it
up.
I increment the page number on each PDF and just pass it in as a tag.
     <fo:page-sequence>
          <xsl:attribute
name="master-reference">STANDARD_PAGE</xsl:attribute>
          <xsl:attribute name="initial-page-number"><xsl:value-of
select="IPN"/></xsl:attribute>
Then I use pdfbox to mrge the resulting PDFs.

________________________________

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: Wednesday, August 31, 2011 9:41 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering



Thanks for the response but the question was already answered, but then
a petty discussion started about whether fo:page-number was FOP or XSLT

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Chen Yang [mailto:cyang@hrsg.ca] 
Sent: 31 August 2011 14:20
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering

 

Hey Theresa,

 

Not sure if this answer your question, 

 

I need to start the page 1 after cover page and Table of contents

 

<xsl:call-template name="insert_cover_page_template"/>

<xsl:call-template name="insert_bookmarks"/>

<xsl:call-template name="insert_table_of_contents_page_template"/>

 

Then I bought in my contents template

<xsl:call-template name="insert_contents_page_template"/>

 

Inside the insert_contents_page_template

 

<xsl:template name="insert_contents_page_template">

          <fo:page-sequence master-reference="A4-landscape"
initial-page-number="1" >  

                  <xsl:call-template
name="insert_page_header-template"/> 

                  <xsl:call-template name="side_bar"/> 

                  <xsl:call-template
name="insert_page_footer_template"/>

             <fo:flow  flow-name="xsl-region-body">

                      <xsl:apply-templates/>

                          <fo:block id="TheVeryLastPage"/>

             </fo:flow>   

          </fo:page-sequence>

</xsl:template>

 

Page number template 

 

  <!-- page number -->

  <xsl:template name="page_number">

     <fo:block-container absolute-position="absolute" top="5mm">

            <fo:block font-family="sans-serif" font-size="7pt"
text-align="right" color="black"     >

            Page <fo:page-number/> of <fo:page-number-citation
ref-id="TheVeryLastPage"/>

            </fo:block>

      </fo:block-container>

  </xsl:template>

 

 

Finally,Insert page number into footer template

 

      <!-- footer -->

    <xsl:template name="insert_page_footer_template">  

        <fo:static-content flow-name="xsl-region-after">   

                                

                        .

                        .

                        .     

      

              <xsl:call-template name="page_number"/>

            

        </fo:static-content>

</xsl:template>

 

Now the "Page 1 of X" will start on the first content page, not on my
cover page or table of contents page.

 

Regards 

 

Chen Yang

 

Programmer / Analyst

HRSG (Human Resource Systems Group)

6 Antares Drive,Phase II Suite 100

Ottawa, ON, K2E 8A9

Tel:        613-745-6605 <tel:613-745-6605>  x 254

Fax:        613-745-4019

Email:     cyang@hrsg.ca <ma...@hrsg.ca> 

Web:       www.hrsg.ca <http://www.hrsg.ca/> 

 

"Competency-based HR Solutions" 

 

 

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: August-30-11 9:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: pagenumbering

 

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as
page 1 not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer

 

________________________________

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11


RE: pagenumbering

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Thanks for the response but the question was already answered, but then a
petty discussion started about whether fo:page-number was FOP or XSLT

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Chen Yang [mailto:cyang@hrsg.ca] 
Sent: 31 August 2011 14:20
To: fop-users@xmlgraphics.apache.org
Subject: RE: pagenumbering

 

Hey Theresa,

 

Not sure if this answer your question, 

 

I need to start the page 1 after cover page and Table of contents

 

<xsl:call-template name="insert_cover_page_template"/>

<xsl:call-template name="insert_bookmarks"/>

<xsl:call-template name="insert_table_of_contents_page_template"/>

 

Then I bought in my contents template

<xsl:call-template name="insert_contents_page_template"/>

 

Inside the insert_contents_page_template

 

<xsl:template name="insert_contents_page_template">

          <fo:page-sequence master-reference="A4-landscape"
initial-page-number="1" >  

                  <xsl:call-template name="insert_page_header-template"/> 

                  <xsl:call-template name="side_bar"/> 

                  <xsl:call-template name="insert_page_footer_template"/>

             <fo:flow  flow-name="xsl-region-body">

                      <xsl:apply-templates/>

                          <fo:block id="TheVeryLastPage"/>

             </fo:flow>   

          </fo:page-sequence>

</xsl:template>

 

Page number template 

 

  <!-- page number -->

  <xsl:template name="page_number">

     <fo:block-container absolute-position="absolute" top="5mm">

            <fo:block font-family="sans-serif" font-size="7pt"
text-align="right" color="black"     >

            Page <fo:page-number/> of <fo:page-number-citation
ref-id="TheVeryLastPage"/>

            </fo:block>

      </fo:block-container>

  </xsl:template>

 

 

Finally,Insert page number into footer template

 

      <!-- footer -->

    <xsl:template name="insert_page_footer_template">  

        <fo:static-content flow-name="xsl-region-after">   

                                

                        .

                        .

                        .     

      

              <xsl:call-template name="page_number"/>

            

        </fo:static-content>

</xsl:template>

 

Now the "Page 1 of X" will start on the first content page, not on my cover
page or table of contents page.

 

Regards 

 

Chen Yang

 

Programmer / Analyst

HRSG (Human Resource Systems Group)

6 Antares Drive,Phase II Suite 100

Ottawa, ON, K2E 8A9

 <tel:613-745-6605> Tel:        613-745-6605 x 254

Fax:        613-745-4019

Email:      <ma...@hrsg.ca> cyang@hrsg.ca

Web:        <http://www.hrsg.ca/> www.hrsg.ca

 

"Competency-based HR Solutions" 

 

 

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: August-30-11 9:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: pagenumbering

 

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as page 1
not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer

 

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11


RE: pagenumbering

Posted by Chen Yang <cy...@hrsg.ca>.
Hey Theresa,

 

Not sure if this answer your question, 

 

I need to start the page 1 after cover page and Table of contents

 

<xsl:call-template name="insert_cover_page_template"/>

<xsl:call-template name="insert_bookmarks"/>

<xsl:call-template name="insert_table_of_contents_page_template"/>

 

Then I bought in my contents template

<xsl:call-template name="insert_contents_page_template"/>

 

Inside the insert_contents_page_template

 

<xsl:template name="insert_contents_page_template">

          <fo:page-sequence master-reference="A4-landscape"
initial-page-number="1" >  

                  <xsl:call-template
name="insert_page_header-template"/> 

                  <xsl:call-template name="side_bar"/> 

                  <xsl:call-template
name="insert_page_footer_template"/>

             <fo:flow  flow-name="xsl-region-body">

                      <xsl:apply-templates/>

                          <fo:block id="TheVeryLastPage"/>

             </fo:flow>   

          </fo:page-sequence>

</xsl:template>

 

Page number template 

 

  <!-- page number -->

  <xsl:template name="page_number">

     <fo:block-container absolute-position="absolute" top="5mm">

            <fo:block font-family="sans-serif" font-size="7pt"
text-align="right" color="black"     >

            Page <fo:page-number/> of <fo:page-number-citation
ref-id="TheVeryLastPage"/>

            </fo:block>

      </fo:block-container>

  </xsl:template>

 

 

Finally,Insert page number into footer template

 

      <!-- footer -->

    <xsl:template name="insert_page_footer_template">  

        <fo:static-content flow-name="xsl-region-after">   

                                

                        .

                        .

                        .     

      

              <xsl:call-template name="page_number"/>

            

        </fo:static-content>

</xsl:template>

 

Now the "Page 1 of X" will start on the first content page, not on my
cover page or table of contents page.

 

Regards 

 

Chen Yang

 

Programmer / Analyst

HRSG (Human Resource Systems Group)

6 Antares Drive,Phase II Suite 100

Ottawa, ON, K2E 8A9

Tel:        613-745-6605 <tel:613-745-6605>  x 254

Fax:        613-745-4019

Email:     cyang@hrsg.ca <ma...@hrsg.ca> 

Web:       www.hrsg.ca <http://www.hrsg.ca/> 

 

"Competency-based HR Solutions" 

 

 

From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: August-30-11 9:50 AM
To: fop-users@xmlgraphics.apache.org
Subject: pagenumbering

 

I was wondering, how can you change the page numbering on
page-number-citation stuff,

 

We have the requirement of numbering starting on the inside cover as
page 1 not page 2 as currently the front page is classed as page 1. 

 

Is there any way to make the numbering start from 1 on the inside of the
front cover?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer