Nope.  Neither will work.  Sorry.  That's what I get for speaking b4
thinking.
Where's the variable going to get it's value from?  Certainly not from the
<fo:page-number> instruction -- that's for the FOP processor to use not the
XSLT processor.  You'll get NaN.

> -----Original Message-----
> From: Matthew L. Avizinis [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 29, 2002 8:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: When a page is not a page
>
>
> I believe this will not work as Wayne intends.
> Page numbers will be generated sequentially starting with the
> initial-page-number.
> So, this might work better:
>
> <fo:page-sequence initial-page-number="0">
>
> then
>
> <xsl:variable name="currentpage"><fo:page-number/></xsl:variable>
>
> then
>
> Then <xsl:value-of select="(2 * $currentpage) + 1"/> for the left page
> number
> and <xsl:value-of select="(2 * $currentpage) + 2"/> for the right page
> number
> hth,
>
>    Matthew L. Avizinis <mailto:[EMAIL PROTECTED]>
> Gleim Publications, Inc.
>    4201 NW 95th Blvd.
>  Gainesville, FL 32606
> (352)-375-0772 ext. 101
>       www.gleim.com <http://www.gleim.com>
>
>
> > -----Original Message-----
> > From: David Wood [mailto:[EMAIL PROTECTED]
> > Sent: Friday, March 29, 2002 8:03 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: When a page is not a page
> >
> >
> > Just speculating, but have you tried putting the page-number
> > element inside
> > a variable?
> >
> > i.e.:
> >
> > <xsl:variable name="currentpage"><fo:page-number/></xsl:variable>
> >
> > Then <xsl:value-of select="$currentpage * 2"/>, etc...
> >
> > I haven't tried this, but it's just what pops into my head...
> >
> > -David
> >
> > At 08:44 AM 3/30/2002 +0800, Wayne Elliott wrote:
> > >A picture paints a thousand words...
> > >
> > >       -----------------------------------
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      | ............... : ..............  |
> > >      |        1        :        2        |
> > >       -----------------------------------
> > >
> > >The picture above represents a single sheet of A4 (Letter)
> > >paper. However it also represents two pages in a book, and
> > >if the page is folded down the dotted line it even starts to
> > >look like a book. My problem is this; I need the page number
> > >sequence as displayed in the  picture - ie. 2 pages per page (sheet)
> > >
> > >I have no trouble laying out the text flow correctly using
> > >stuff like
> > >
> > >     <fo:simple-page-master master-name="content"
> > >                            page-height="{$pageheight}mm"
> > >                            page-width="{$pagewidth}mm"
> > >                            margin-left="{$marginleft}mm"
> > >                            margin-right="{$marginright}mm"
> > >                            margin-top="{$margintop}mm"
> > >                            margin-bottom="{$marginbottom}mm">
> > >
> > >       <fo:region-before extent="10mm"/>
> > >
> > >       <fo:region-after extent="10mm"/>
> > >
> > >
> > >       <fo:region-body margin-top="10mm"
> > >                       margin-bottom="10mm"
> > >                       column-count="2"
> > >                       column-gap="20mm"/>
> > >
> > >
> > >
> > >     </fo:simple-page-master>
> > >
> > >and I defined a static region for the page number values
> > >using the following
> > >
> > >   <fo:static-content flow-name="xsl-region-after"
> > >                      font-family="serif"
> > >                      font-size="9pt">
> > >
> > >     <fo:table table-layout="fixed">
> > >       <fo:table-column column-width="120mm"/>
> > >       <fo:table-column column-width="120mm"/>
> > >       <fo:table-body>
> > >         <fo:table-row>
> > >           <fo:table-cell>
> > >             <fo:block text-align="center">
> > >       <fo:page-number/> <!-- 2x -->
> > >              </fo:block>
> > >           </fo:table-cell>
> > >           <fo:table-cell>
> > >             <fo:block text-align="center">
> > >       <fo:page-number/> <!-- 2x + 1 -->
> > >              </fo:block>
> > >           </fo:table-cell>
> > >         </fo:table-row>
> > >       </fo:table-body>
> > >     </fo:table>
> > >
> > >   </fo:static-content>
> > >
> > >but I do not know how to get the <fo:page-number/> to play
> > >the game and give me more than one page number per page.
> > >
> > >Perhaps I am wrong in my approach and there is a way of
> > >specifying two page regions per page/sheet, but I have
> > >not found it yet.
> > >
> > >Any ideas?
> > >
> > >WPE

Reply via email to