you could try something like:

  <xsl:template match="report">
<xsl:variable name="this-page-sequence" select="concat('EOR',position())"/>
   <fo:page-sequence master-name="report" initial-page-number="1" >
     <fo:static-content flow-name="xsl-region-before">
       <xsl:text>Report </xsl:text>
       <xsl:value-of select="title">
     </fo:static-content>
     <fo:static-content flow-name="xsl-region-after">
       <fo:block><fo:leader leader-pattern="rule" leader-length
="max"/></fo:block>
       <fo:block text-align="end"><xsl:text>Page
</xsl:text><fo:page-number/></fo:block>
     </fo:static-content>
     <fo:flow flow-name="xsl-region-body">
       <xsl:apply-templates>
                <xsl:with-param name="this-page-sequence"
select="$this-page-sequence"/>
        </xsl:apply-templates>
        <!-- -->
        <fo:block height="0mm" width="0mm">
                <xsl:attribute name="id"><xsl:value-of
select="$this-page-sequence"/></xsl:attribute>
        </fo:block>
        <!-- -->
     </fo:flow>
    </fo:page-sequence>
  </xsl:template>

  <xsl:template match="somenode">
        <xsl:param name="this-page-sequence"/>
        <!-- some other fo stuff -->
        <fo:page-number-citation ref-id="$this-page-sequence"/>
  </xsl:template>

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 19 October 2001 02:40
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Antwort: page numbering problem...



thanx Joerg.
It worked ...
but one problem still persists. I actually wanted to display page 1 of
"<total pages>". But in this case, I can't do it coz FOP does not allow to
declare a block with same id more than once in a document. So the known
method of getting the total page numbers (<fo:page-number-citation ref-id
="endofdoc"/>) can't work here as it does not let me declare the block with
this name in every page sequence.
Moreover is there any limitation with the maximum number of page sequences
we can have in one document.?

Is there any wayout????
Please help....
thanks
wali



Hi wali,
>I creat a PDF document which have reports for different customers.  One
>document can contain many reports. Now I want to mark the pages for
reports
>individually. i.e.
...
>Every new report starts at new page. and every report can consist of
>different number of pages.

Create a page sequence for each report. If you are creating the
FO via XSLT, and if you have the reports in individual XML
elements (here called "report"), you can use something like
  <xsl:template match="report">
   <fo:page-sequence master-name="report" initial-page-number="1" >
     <fo:static-content flow-name="xsl-region-before">
       <xsl:text>Report </xsl:text>
       <xsl:value-of select="title">
     </fo:static-content>
     <fo:static-content flow-name="xsl-region-after">
       <fo:block><fo:leader leader-pattern="rule" leader-length
="max"/></fo:block>
       <fo:block text-align="end"><xsl:text>Page
</xsl:text><fo:page-number/></fo:block>
     </fo:static-content>
     <fo:flow flow-name="xsl-region-body">
       <xsl:apply-templates/>
     </fo:flow>
    </fo:page-sequence>
  </xsl:template>

Tailor this to your needs. Of course you'll have to define
a page master "report" (you may have different page masters
for the title page, the TOC, appendices etc.)

HTH

Joerg Pietschmann




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to