Precisely.  I thought I just said that.  You're just more eloquent... :-)

> -----Original Message-----
> From: Arved Sandstrom [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 29, 2002 9:48 PM
> To: [EMAIL PROTECTED]
> Subject: RE: When a page is not a page
>
>
> Here is the thing. XSLT and XSL-FO are independent. XSL-FO has no more
> special meaning to XSLT than does MathML or DocBook or SVG. XSLT
> understands
> its own elements (including extensions of course). It understands
> no others.
>
> <fo:page-number/> (or as Ken Holman points out, <page-number/> in the
> http://www.w3.org/1999/XSL/Format namespace, since we may assign
> any prefix
> we like, or none) is not acted on by the XSL-FO formatter to produce a
> number until after XSLT is done. Period.
>
> And note that <fo:page-number/> never actually _is_ a number, and in fact
> the formatter is not required to even generate a stringified page-number.
>
> This is what the XSL Recommendation allows or does not allow you to do. If
> you feel that there is a compelling use case for being able to do what you
> want to do, I'd suggest writing it up and submitting it to the
> [EMAIL PROTECTED] list.
>
> Hope this clears things up.
>
> Regards,
> Arved Sandstrom
>
> -----Original Message-----
> From: Wayne Elliott [mailto:[EMAIL PROTECTED]
> Sent: March 29, 2002 10:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: When a page is not a page
>
>
> Thanks for the tips guys. However <fo:page-number/> does
> not like being treated like a number, as it does not assign
> to a variable numerically. This was surprising. The following
> snippet
>
>  <fo:block space-after="5mm" text-align="justify">
>     - <fo:page-number/>
>     -  <xsl:variable name="curpage"><fo:page-number/></xsl:variable>
>        <xsl:value-of select="$curpage"/>
>     -  <xsl:value-of select="$curpage * 2"/>
>     - <xsl:value-of select="floor($curpage) * 2"/>
>     - <xsl:value-of select="column-number"/>
>     - <xsl:value-of select="(2 * $curpage) + 1"/>
>     - <xsl:number/>
>   </fo:block>
>
> produces the following output
>
> On page (sheet) 1.
>
> - 1 - - NaN - NaN - - NaN - 1
>
> On sheet 2.
>
> - 2 - - NaN - NaN - - NaN - 1
>
> i.e On sheet n.
>
> - n - - NaN - NaN - - NaN - 1
>
> Expected for sheet n was
>
> - n - n - 2n - 2n - 2n? - 2n+1- 1?
>
> Not sure why page-number behaves non-numerically. Perhaps it
> is something to do with the number formatting, e.g 1 = i = a
> etc. Perhaps there is a low level function that can extract
> the number part from fo:page-number?
>
> What I really need is a way of determining the number of the
> current column, based on column count and page number,but
> this also eludes me.
>
> WPE
>
> ----- Original Message -----
> From: "Matthew L. Avizinis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, March 30, 2002 9:42 AM
> 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