Hello,
This is similar to Dracosms post. In the following XML I want to group the MEMBER_NAME so that I only have 2 rows in a table with the totals for open, aborted etc...
So far I have tried this:
All I am getting is 2 PSM(Edgeware) rows with its total.
Any thoughts welcome.
Thanks
Matt
Matt
This is similar to Dracosms post. In the following XML I want to group the MEMBER_NAME so that I only have 2 rows in a table with the totals for open, aborted etc...
Code:
<VFILE_DATA>
<ALLOCATION_PERIOD>
<CODE>157.00</CODE>
<ALLOC_NAME>EM PSME (Purchase)</ALLOC_NAME>
<MEMBER_NAME>PSM (Edgeware)</MEMBER_NAME>
<MEMBER_CODE>14.00</MEMBER_CODE>
<ALLOCATED>0.00</ALLOCATED>
<OPEN>0</OPEN>
<COMPLETED>0</COMPLETED>
<ABORTED>0</ABORTED>
<DECLINED>0</DECLINED>
</ALLOCATION_PERIOD>
<ALLOCATION_PERIOD>
<CODE>158.00</CODE>
<ALLOC_NAME>EM PSME (Remortgage)</ALLOC_NAME>
<MEMBER_NAME>PSM (Edgeware)</MEMBER_NAME>
<MEMBER_CODE>14.00</MEMBER_CODE>
<ALLOCATED>0.00</ALLOCATED>
<OPEN>0</OPEN>
<COMPLETED>0</COMPLETED>
<ABORTED>0</ABORTED>
<DECLINED>0</DECLINED>
</ALLOCATION_PERIOD>
<ALLOCATION_PERIOD>
<CODE>114</CODE>
<ALLOC_NAME>Acme (Purchase)</ALLOC_NAME>
<MEMBER_NAME>PSM (Wakefield)</MEMBER_NAME>
<MEMBER_CODE>98</MEMBER_CODE>
<ALLOCATED>12</ALLOCATED>
<OPEN>0</OPEN>
<COMPLETED>0</COMPLETED>
<ABORTED>0</ABORTED>
<DECLINED>0</DECLINED>
</ALLOCATION_PERIOD>
So far I have tried this:
Code:
<xsl:key name="member-period" match="ALLOCATION_PERIOD/MEMBER_CODE" use="."/>
...more xsl
<xsl:for-each select="ALLOCATION_PERIOD/MEMBER_CODE[generate-id()=generate-id(key('member-period',.))]">
<tr> <xsl:attribute name="ID"><xsl:value-of select="CODE" /></xsl:attribute>
<td height="29" valign="top" ><a href="#" onclick="showButtons(this)"><xsl:value-of select="//MEMBER_NAME"/></a></td>
<td valign="top" class="tdtotals"><xsl:value-of select="sum(//OPEN)"/></td>
<td valign="top" class="tdtotals"><xsl:value-of select="sum(//ALLOCATED)"/></td>
<td valign="top" class="tdtotals"><xsl:value-of select="sum(//COMPLETED)"/></td>
<td valign="top" class="tdtotals"><xsl:value-of select="sum(//ABORTED)"/></td>
<td valign="top" class="tdtotals"><xsl:value-of select="sum(//DECLINED)"/></td>
<td valign="top" class="tdtotals"><xsl:value-of select="generate-id()"/></td>
</tr>
</xsl:for-each>
All I am getting is 2 PSM(Edgeware) rows with its total.
Any thoughts welcome.
Thanks
Matt
Matt