Vikram,
I've modified your xsl-fo with two main fixes. I don't have time to test
it, but here're the changes:
1. If I recall, since xsl:include documents are treated almost as
"equals" with the parent xsl:document, the xsl:include must be the first
child of xsl:stylesheet.
2. The <fo:block id="last-page"/> must be the last thing in the fo:flow
section. That way, when you call it with:
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center">
Page <fo:page-number/> of <fo:page-number-citation ref-id="last-page"/>
</fo:block>
</fo:static-content>
It'll be able to calculate the page-number-citation value.
3. You're receiving the error, because you've placed <fo:block
id="last-page"/> in the region-after which is repeated on *every* page.
Move it to the end of the fo:flow section, and you're set!
Good luck!
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:include href="/includes.xsl"/>
<xsl:output method="xml" version="1.0" omit-xml-declaration="no"
indent="yes"/>
<!-- ========================= -->
<!-- root element: projectteam -->
<!-- ========================= -->
<xsl:template match="Report">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simpleA4" page-height="21cm"
page-width="29.7cm" margin-top="2cm" margin-bottom="2cm" margin-left="1cm"
margin-right="1cm"
writing-mode="tb-rl">
<fo:region-before extent="4cm"/>
<fo:region-after extent="1cm"/>
<fo:region-body margin-top="2cm" margin-bottom="2cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence initial-page-number="1" language="en" country="us"
master-reference="simpleA4">
<fo:static-content flow-name="xsl-region-before">
<fo:block font-size="16pt" space-after="2mm"><xsl:value-of select
="projectname"/>
</fo:block>
<fo:block font-size="10pt" color="red" font-style="italic" space-after
="5mm"><xsl:value-of select="reportInfo"/>
</fo:block>
</fo:static-content >
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center">page
<fo:page-number/> of <fo:page-number-citation
ref-id="last-page"/></fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="8pt" space-after="2mm">
<fo:table table-layout="auto" text-align="center">
<xsl:variable name="reportName"><xsl:value-of select
="reportname"/></xsl:variable>
<xsl:choose>
<xsl:when test="$reportName='RPT_USER_ACCESS'"><xsl:call-template name
="RPT_USER_ACCESS"/></xsl:when>
<xsl:when test="$reportName='RPT_TECH_ACCESS'"><xsl:call-template name
="RPT_TECH_ACCESS"/></xsl:when>
<xsl:when test="$reportName='RPT_NB_BY_DISPCDE'"><xsl:call-template name
="RPT_NB_BY_DISPCDE"/></xsl:when>
<xsl:when test="$reportName='RPT_NB_BY_NR'"><xsl:call-template name
="RPT_NB_BY_NR"/></xsl:when>
<xsl:when test="$reportName='RPT_FOR_TOTAL'"><xsl:call-template name
="RPT_FOR_TOTAL"/></xsl:when>
</xsl:choose>
<fo:table-header reference-orientation="90" >
<fo:table-row text-align="center" background-color="#A1A1A1">
<xsl:for-each select="ColumnHeader">
<fo:table-cell border-style="solid" border-width="0.2mm" padding ="1.5mm"
>>
<fo:block><xsl:value-of select="text()"/></fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</fo:table-header>
<fo:table-body reference-orientation="90" >
<xsl:apply-templates select="Row"/>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block id="last-page"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<!-- ========================= -->
<!-- child element: member -->
<!-- ========================= -->
<xsl:template match="Row">
<fo:table-row>
<xsl:for-each select="Column">
<fo:table-cell border-style="solid" border-width="0.2mm" padding
="1.5mm">
<fo:block>
<xsl:value-of select="text()"/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:template>
</xsl:stylesheet>
--
Clay Leeds - [EMAIL PROTECTED]
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]