Georg,
I made the change you suggested as follows:
    <fo:block font-size="9pt" text-align="left">
       Page <fo:page-number/> of <fo:page-number-citation ref-id="last-page<invoiceCounter>"/>
    </fo:block>
...
...
...
   <fo:block id="last-page<invoiceCounter>">
   </fo:block>
 
Here is the error:
[Fatal Error] cy.xsl:199:76: The value of attribute "ref-id" associated with an element type "fo:page-number-citation" must not contain the '<' character.
file:///CY/JLS/./java/cy.xsl; Line #199; Column #76; org.xml.sax.SAXParseException: The value of attribute "ref-id" associated with an element type "fo:page-number-citation" must not contain the '<' character.
 

Jeff Steffanina
Marriott International
FOSSE Development,  Bethesda, MD
(301)380-2047
jeff.steffanina@marriott.com
Marriott Technology: Shaping and Enabling Our Business
above-property solutions § agile designs § personalized connectivity

    This communication contains information from Marriott International, Inc. that may be confidential. Except for personal use by the intended recipient, or as expressly authorized by the sender, any person who receives this information is prohibited from disclosing, copying, distributing, and/or using it. If you have received this communication in error, please immediately delete it and all copies, and promptly notify the sender. Nothing in this communication is intended as an electronic signature under applicable law.

 


From: Georg Datterl [mailto:georg.datterl@geneon.de]
Sent: Tuesday, September 14, 2010 8:32 AM
To: fop-users@xmlgraphics.apache.org
Subject: AW: Page numbers

Hi Jeff,

 

Sure. Untried, but should work: „last-page” is just called “last-page” for convenience. Each invoice (=page-sequence) can have one last block with a name like “last-page<invoiceCounter” and a footer of “Page <fo:page-number/> of <fo:page-number-citation ref-id="last-page<invoiceCounter>"/>

 

Mit freundlichen Grüßen

 

Georg Datterl

 

------ Kontakt ------

 

Georg Datterl

 

Geneon media solutions gmbh

Gutenstetter Straße 8a

90449 Nürnberg

 

HRB Nürnberg: 17193

Geschäftsführer: Yong-Harry Steiert

 

Tel.: 0911/36 78 88 - 26

Fax: 0911/36 78 88 - 20

 

www.geneon.de

 

Weitere Mitglieder der Willmy MediaGroup:

 

IRS Integrated Realization Services GmbH:    www.irs-nbg.de

Willmy PrintMedia GmbH:                            www.willmy.de

Willmy Consult & Content GmbH:                 www.willmycc.de

 

Von: Steffanina, Jeff [mailto:Jeff.Steffanina@marriott.com]
Gesendet: Dienstag, 14. September 2010 14:27
An: fop-users@xmlgraphics.apache.org
Betreff: RE: Page numbers

 

Georg,

A single XML file contains many invoices.  Any single invoice may contain multiple pages.  For EACH invoice in the file, I need to produce a page count in the form of:  Page x of  z for that invoice.

 

Any ideas?

 

Jeff


From: Georg Datterl [mailto:georg.datterl@geneon.de]
Sent: Monday, September 13, 2010 3:00 PM
To: fop-users@xmlgraphics.apache.org
Subject: AW: Page numbers

Hi Jeff,

 

your block <fo:block id="last-page"> is inside of a <for-each>. So you probably get such a block once per invoice. You only want it on the last invoice.

 

Mit freundlichen Grüßen

 

Georg Datterl

 

------ Kontakt ------

 

Georg Datterl

 

Geneon media solutions gmbh

Gutenstetter Straße 8a

90449 Nürnberg

 

HRB Nürnberg: 17193

Geschäftsführer: Yong-Harry Steiert

 

Tel.: 0911/36 78 88 - 26

Fax: 0911/36 78 88 - 20

 

www.geneon.de

 

Weitere Mitglieder der Willmy MediaGroup:

 

IRS Integrated Realization Services GmbH:    www.irs-nbg.de

Willmy PrintMedia GmbH:                            www.willmy.de

Willmy Consult & Content GmbH:                 www.willmycc.de

 

Von: Steffanina, Jeff [mailto:Jeff.Steffanina@marriott.com]
Gesendet: Montag, 13. September 2010 20:48
An: fop-users@xmlgraphics.apache.org
Betreff: Page numbers

 

 

FOP 0.95  Java 5

I receive a single, large XML invoice file.  A single file contains multiple invoices of varying length.  When the XML contains only ONE invoice my page numbering works fine. I am trying to number the pages in the form of:   Page x  of  z

However, when I include multiple invoices within ONE  XML file, my "last-page" logic fails.  I get this error:
      ValidationException: Property id "last-page" previously used; id values must be unique in document.

When I remove the references to "last-page", my invoices print as expected.

Currently, I use the following logic:
 <fo:block-container position="absolute" top="2.0in" left="5.5in">
    <fo:block font-size="9pt" text-align="left">
       Page <fo:page-number/> of <fo:page-number-citation ref-id="last-page"/>
    </fo:block>


        <fo:block id="last-page">
        </fo:block>
    </fo:flow>
  </fo:page-sequence>
</xsl:for-each>

 

Any suggestions?

 

Jeff