Loading ...
Sorry, an error occurred while loading the content.
 

Page numbering

Expand Messages
  • Whitney, Dan (FPDG)
    Know this question has been asked before, but there was no answer posted that I could find Have a large xml file with the following structure:
    Message 1 of 1 , Sep 24, 2002
      Know this question has been asked before, but there was no answer posted
      that I could find

      Have a large xml file with the following structure:

      <document>
      <record>
      <ri>....</ri>
      <ri>....</ri>
      <ri>.....</ri>
      </record>
      <record>
      <ri>....</ri>
      <ri>....</ri>
      <ri>.....</ri>
      </record>
      <record>
      <ri>....</ri>
      <ri>....</ri>
      <ri>.....</ri>
      </record>
      </document>

      For my pdf file (using fop) I want the page numbering to be displayed as "1
      of 'total page numbers for each record'"
      So the first record would paginate as 1 of 8 and the second would be
      something like 1 of 4 etc.
      I have tried the following in the xsl (idref="endofdoc" and id="endofdoc")

      <fo:page-sequence master-reference="simple" initial-page-number="1">
      ...
      <fo:static-content flow-name="xsl-region-after">
      <fo:block text-align="center"
      font-size="10pt"
      font-family="serif"
      line-height="14pt" >
      Please review and update. Return to Financial Post DataGroup, 333 King
      St. E. Toronto, ON M5A 4N2 by August 29, 2002
      </fo:block>
      <fo:block text-align="center"
      font-size="10pt"
      font-family="serif"
      line-height="14pt" >
      <fo:page-number/>
      <xsl:text> of </xsl:text>
      <fo:page-number-citation ref-id="endofdoc"/>
      </fo:block>
      </fo:static-content>
      <fo:flow flow-name="xsl-region-body">
      <fo:block font-size="10pt"
      font-family="sans-serif"
      line-height="14pt"
      padding-top="3pt"
      space-before.optimum="0cm"
      text-align="left">
      <xsl:apply-templates/>
      </fo:block>
      <fo:block id="endofdoc"></fo:block>
      </fo:flow>
      </fo:page-sequence>

      but of course I get an error because the id is set to endofdoc with the
      first record and with each subsequent record (therefore not unique). Is
      there any way to increment some sort of counter of the idref and id values
      to overcome this problem?

      Thanks in advance,

      Dan
    Your message has been successfully submitted and would be delivered to recipients shortly.