You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Barry Workman <bw...@beol.net> on 2000/12/13 16:31:15 UTC

dynamic page numbering and FOP

We need to generate a beginning page number dynamically in FOP 0.14. Pages
will be numbered sequentially from day 1 to day 365 of the year.

We will not know the actual final page number of today's run until it is
rendered into PDF. The next page number will then be entered in tomorrows
document.

 We have a Java GUI built that allows a clerk to fill in the blanks and
produce xml frags, so we will generate our
beginning page number each day into a fragment via this mechanism.


My thought is to make this fragment an xsl style sheet  containing
<xsl:variable name="page" select="2002 or whatever">and use xsl:import to
pass this variable into the main style sheet in some fashion to change the
value of <fo:page-sequence master-name="MainContent"
initial-page-number="$page">

my initial run yields an error statement $page is not a valid value for
initial-page-number.

suggestions? thoughts?


Ex  XSL semper aliquid novi-
Barry Workman


Re: dynamic page numbering and FOP

Posted by Barry Workman <bw...@beol.net>.
Yes...it works. The braces make all the difference. Thank you !
----- Original Message -----
From: "Kelly Campbell" <ca...@camk.net>
To: <fo...@xml.apache.org>
Sent: Wednesday, December 13, 2000 11:09 AM
Subject: Re: dynamic page numbering and FOP


> I'm assuming you're using xslt to create the formatting object file. If
> so, that needs to be
>
> initial-page-number="{$page}"
>
> to invoke the variable replacement. (Note the braces)
>
> -Kelly
>
> On Wed, Dec 13, 2000 at 10:31:15AM -0500, Barry Workman wrote:
> > We need to generate a beginning page number dynamically in FOP 0.14.
Pages
> > will be numbered sequentially from day 1 to day 365 of the year.
> >
> > We will not know the actual final page number of today's run until it is
> > rendered into PDF. The next page number will then be entered in
tomorrows
> > document.
> >
> >  We have a Java GUI built that allows a clerk to fill in the blanks and
> > produce xml frags, so we will generate our
> > beginning page number each day into a fragment via this mechanism.
> >
> >
> > My thought is to make this fragment an xsl style sheet  containing
> > <xsl:variable name="page" select="2002 or whatever">and use xsl:import
to
> > pass this variable into the main style sheet in some fashion to change
the
> > value of <fo:page-sequence master-name="MainContent"
> > initial-page-number="$page">
> >
> > my initial run yields an error statement $page is not a valid value for
> > initial-page-number.
> >
> > suggestions? thoughts?
> >
> >
> > Ex  XSL semper aliquid novi-
> > Barry Workman
> >
>
> --
> Kelly A. Campbell                        Software Engineer
> camk@channelpoint.com                    Channelpoint, Inc.
> camk@camk.net  camk@merlotxml.org        Colorado Springs, Co.
>


Re: dynamic page numbering and FOP

Posted by Kelly Campbell <ca...@camk.net>.
I'm assuming you're using xslt to create the formatting object file. If 
so, that needs to be 

initial-page-number="{$page}"

to invoke the variable replacement. (Note the braces)

-Kelly

On Wed, Dec 13, 2000 at 10:31:15AM -0500, Barry Workman wrote:
> We need to generate a beginning page number dynamically in FOP 0.14. Pages
> will be numbered sequentially from day 1 to day 365 of the year.
> 
> We will not know the actual final page number of today's run until it is
> rendered into PDF. The next page number will then be entered in tomorrows
> document.
> 
>  We have a Java GUI built that allows a clerk to fill in the blanks and
> produce xml frags, so we will generate our
> beginning page number each day into a fragment via this mechanism.
> 
> 
> My thought is to make this fragment an xsl style sheet  containing
> <xsl:variable name="page" select="2002 or whatever">and use xsl:import to
> pass this variable into the main style sheet in some fashion to change the
> value of <fo:page-sequence master-name="MainContent"
> initial-page-number="$page">
> 
> my initial run yields an error statement $page is not a valid value for
> initial-page-number.
> 
> suggestions? thoughts?
> 
> 
> Ex  XSL semper aliquid novi-
> Barry Workman
> 

-- 
Kelly A. Campbell                        Software Engineer
camk@channelpoint.com                    Channelpoint, Inc.
camk@camk.net  camk@merlotxml.org        Colorado Springs, Co.