XSLT Markers / Table-Footer
This is the template:
<xsl:template name="ListOfPremiums" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:param name="ParamDivision"/>
<xsl:for-each select="document('c:\dental\xml\LineItem_DDPR_0807 2012060135.xml')/LineItem_Load/Section_Record">
<xsl:variable name="vNumFacturaCompleta" select="StatementIdentifier" />
<xsl:variable name="vPeriodo" select="Period" />
<xsl:variable name="vGrupo" select="GroupNumber" />
<xsl:variable name="vDivision" select="Division" />
<xsl:variable name="vNumFactura" select="substring-before($vNumFacturaCompleta, '-')"/>
<xsl:variable name="vTotalPremiums" select="CurrentPremiums" />
<xsl:variable name="vEnrollees" select="TotalCount" />
<xsl:if test="$vDivision=$ParamDivision and Identifier != 'Adjustments'">
<fo:table>
<fo:table-header>
<!--<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<retrieve-table-marker retrieve-class-name="cont"/>
</fo:block>
</fo:table-cell>
</fo:table-row> -->
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:retrieve-table-marker retrieve-class-name="section.head.marker"
retrieve-position-within-table="last-ending-within-page"
retrieve-boundary="table"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:table>
<fo:table-column column-width="40%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="40%"/>
<fo:table-body>
<!-- <table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<block>
<marker class-name="cont"/>
</block>
</table-cell>
</table-row>
<table-row>
<table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<block>
<marker class-name="cont">Continue</marker>
</block>
</table-cell>
</table-row>-->
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="12pt" font-family="Tahoma, sans-serif">
List of enrollees and premiums
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="12pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="normal" font-size="10pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vPeriodo"/>
</fo:block>
</fo:table-cell>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:table>
<fo:table-column column-width="40%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="20%"/>
<fo:table-body>
<!-- Primera Fila -->
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
Invoice number:
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vNumFactura"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
Group:
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vGrupo"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
Division:
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="10pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vDivision"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:table>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="23%"/>
<fo:table-column column-width="17%"/>
<fo:table-column column-width="2%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="8%"/>
<fo:table-body>
<!-- Primera Fila -->
<fo:table-row>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
ENROLLEE ID
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
ENROLLEE NAME
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
EFFECTIVE DATE
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
EMPLOYER
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
REFERENCE
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
COVERAGE
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
OPTION
</fo:block>
</fo:table-cell>
<fo:table-cell border-top-color = "black" border-bottom-color="black" text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
AMOUNT
</fo:block>
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
DUE ($)
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:retrieve-table-marker retrieve-class-name="section.head.marker"
retrieve-position-within-table="last-ending-within-page"
retrieve-boundary="table"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:retrieve-table-marker retrieve-class-name="section.head.marker"
retrieve-position-within-table="last-ending-within-page"
retrieve-boundary="table"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker"></marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker">continued</marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:table>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="23%"/>
<fo:table-column column-width="17%"/>
<fo:table-column column-width="2%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="20%"/>
<fo:table-column column-width="8%"/>
<fo:table-body>
<xsl:for-each select="LineItem_Record">
<xsl:variable name="Nombre" select="FirstName" />
<xsl:variable name="Apellido" select="LastName" />
<xsl:variable name="Tienda" select="StoreLoc" />
<xsl:variable name="FechaEfectividad" select="EffectiveDate" />
<xsl:variable name="NumEnrolleID" select="SUPPID" />
<xsl:variable name="vCoverageOption" select="CoverageOption" />
<xsl:variable name="vAmountDue" select="AmountDue" />
<!--<table-row>
<table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<block>
<marker class-name="cont"/>
</block>
</table-cell>
</table-row>
<table-row>
<table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<block>
<marker class-name="cont"><fo:inline font-weight="bolder">
(Continued)
</fo:inline></marker>
</block>
</table-cell>
</table-row>-->
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$NumEnrolleID"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$Apellido"/>, <xsl:value-of select="$Nombre"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$FechaEfectividad"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$Tienda"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:choose>
<xsl:when test="$vCoverageOption = 01">
EE Only
</xsl:when>
<xsl:when test="$vCoverageOption = 02">
EE + Spouse
</xsl:when>
<xsl:when test="$vCoverageOption = 03">
Family
</xsl:when>
<xsl:when test="$vCoverageOption = 04">
Supercomposite
</xsl:when>
<xsl:when test="$vCoverageOption = 05">
EE + 1 Child
</xsl:when>
<xsl:when test="$vCoverageOption = 06">
EE + Children
</xsl:when>
<xsl:when test="$vCoverageOption = 07">
EE + 1
</xsl:when>
<xsl:when test="$vCoverageOption = 08">
Children Only
</xsl:when>
<xsl:when test="$vCoverageOption = 09">
Spouse Only
</xsl:when>
<xsl:when test="$vCoverageOption = 10">
EE + 2
</xsl:when>
<xsl:when test="$vCoverageOption = 11">
EE + 2 to 4
</xsl:when>
<xsl:when test="$vCoverageOption = 12">
EE + 2 or More
</xsl:when>
<xsl:when test="$vCoverageOption = 13">
EE + 3 or More
</xsl:when>
<xsl:when test="$vCoverageOption = 14">
EE + 5 or More
</xsl:when>
<xsl:when test="$vCoverageOption = 15">
Per Member
</xsl:when>
<xsl:when test="$vCoverageOption = 16">
EE + 1 or More
</xsl:when>
<xsl:when test="$vCoverageOption = 99">
N/A
</xsl:when>
<xsl:otherwise>
Other
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<fo:block font-size="7pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vAmountDue"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker"></marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker">continued</marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker"></marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker">continued</marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="7pt" font-family="Tahoma, sans-serif">
<fo:leader />
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:table>
<xsl:variable name="vNumFacturaCompleta" select="StatementIdentifier" />
<xsl:variable name="vPeriodo" select="Period" />
<xsl:variable name="vGrupo" select="GroupNumber" />
<xsl:variable name="vDivision" select="Division" />
<xsl:variable name="vNumFactura" select="substring-before($vNumFacturaCompleta, '-')"/>
<xsl:variable name="vTotalPremiums" select="CurrentPremiums" />
<xsl:variable name="vEnrollees" select="TotalCount" />
<fo:table-column column-width="50%"/>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
Current premiums for group <xsl:value-of select="$vGrupo"/> division <xsl:value-of select="$vDivision"/> :
</fo:block>
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
Total number of enrollees: <xsl:value-of select="$vEnrollees"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="left" display-align="left" border-color="white" border-style="solid">
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
</fo:block>
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" display-align="left" border-color="white" border-style="solid">
<xsl:if test="position() != last()" >
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vTotalPremiums"/>
</fo:block>
</xsl:if>
<xsl:if test="position() = last()" >
<fo:block font-weight="bold" font-size="9pt" font-family="Tahoma, sans-serif">
<xsl:value-of select="$vTotalPremiums"/>
</fo:block>
</xsl:if>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker"></marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<marker class-name="section.head.marker">continued</marker>
<fo:block/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:if>
</xsl:for-each>
</xsl:template>
Thanks!
|