I don't have control over the XML, which is delivered to me from elsewhere. So, I can't get additional tags.
However, I have been able to make some progress, and now get one record per page. I know that using MOD and position(), I can send 5 records per page sequence, but I am not sure how to implement it in the code.
Following is the XSL for the XML noted above, which generates 1 record per page-sequence while I want it to generate 5 records per page-sequence.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl
utput method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<!-- Define a body (or default) page. -->
<fo:simple-page-master master-name="default-master">
<!-- Central part of page -->
<fo:region-body/>
<fo:region-before/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:apply-templates select="/ROWSET/ROW">
</xsl:apply-templates>
</fo:root>
</xsl:template>
<xsl:template match="ROW">
<!-- Page Sequence -->
<fo
age-sequence master-reference="default-master">
<fo:static-content flow-name="xsl-region-before">
<fo:block>
<!-- Define header. -->
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block>
<!-- Define footer. -->
</fo:block>
</fo:static-content>
<!-- The contents of the body page
entries -->
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed">
<fo:table-column column-width="20mm"/>
<fo:table-column column-width="43mm"/>
<fo:table-column column-width="20mm"/>
<fo:table-column column-width="43mm"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell number-columns-spanned="4" padding="4.0pt">
<fo:block><xsl:value-of select="ROWSET/REPORT_HEADER"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding="1.0pt">
<fo:block text-align="right">
<fo:inline>Name:</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1.0pt">
<fo:block text-align="left" font-size="6pt" font-weight="normal">
<xsl:value-of select="FIRST_NAME"/></fo:block>
</fo:table-cell>
<fo:table-cell padding="1.0pt">
<fo:block text-align="right" >
<xsl:text>SSN:</xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1.0pt">
<fo:block text-align="left" font-size="6pt" font-weight="normal">
<xsl:value-of select="SSN"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
- - - - getting all other data - - - - - -
</fo:table-body>
</fo:table>
</fo:flow>
</fo
age-sequence>
</xsl:template>
</xsl:stylesheet>