Subject: [xsl] how to sort after applying generate-id()? From: "Lee, Insoo" <Insoo.Lee@xxxxxx> Date: Tue, 14 Oct 2003 17:24:58 -0400 |
Hello - I'm having trouble sorting the item grouped by generate-id()... I have xml that looks like <REPORT> <ENTITY> <FUND_CURRENCY_GROUP CURRENCY="GBP"> <FUND_CODE_GROUP TA_FUND_CODE="G631"> <FUND_ROW> <TRADE_TYPE>PUR</TRADE_TYPE> </FUND_ROW> </FUND_CODE_GROUP> </FUND_CURRENCY_GROUP> <FUND_CURRENCY_GROUP CURRENCY="USD"> <FUND_CODE_GROUP TA_FUND_CODE="U631"> <FUND_ROW> <TRADE_TYPE>PUR</TRADE_TYPE> </FUND_ROW> </FUND_CODE_GROUP> </FUND_CURRENCY_GROUP> </ENTITY> and many more ENTITY like this </REPORT> XSL looks like follwing: <xsl:variable name="currencies" select="//FUND_CURRENCY_GROUP"/> <xsl:if test="generate-id(.)= generate-id( $currencies[ @CURRENCY = current()/@CURRENCY ] )"> <tr> <td colspan="4"><b>Grand Total Purchases (<xsl:value-of select="@CURRENCY"/>):</b></td> <td align="right" width="14%"> </td> <td align="right" width="14%"> </td> </tr> <tr> <td colspan="4"><b>Grand Total Redemptions (<xsl:value-of select="@CURRENCY"/>):</b></td> <td align="right" width="14%"> </td> <td align="right" width="14%"> </td> </tr> <tr> <td colspan="4"><b>Grand Total Net Change (<xsl:value-of select="@CURRENCY"/>):</b></td> <td align="right" width="14%"> </td> <td align="right" width="14%"> </td> <!-- I would do something like this, if it works <td align="right" width="14%"><b><u><xsl:value-of select="format-number(sum( $currencies[@CURRENCY=current()/@CURRENCY]/FUND_CODE_GROUP/@TOTAL_FUND_VALUE _NET ), '#,###,###,##0.00')"/></u></b></td> --> </tr> </xsl:if> </xsl:for-each> This would return me cross-entities grouped by currency Grand Total Purchases (USD) Grand Total Purchases (GBP) Grand Total Purchases (EUR) This is good, but is there anyway to combine sorting with this generate-id() so that it appears alphabetically? Grand Total Purchases (EUR) Grand Total Purchases (GBP) Grand Total Purchases (USD) Thanks IL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Handling type conversion erro, Martinez, Brian | Thread | Re: [xsl] how to sort after applyin, Mukul Gandhi |
[xsl] Handling type conversion erro, Martinez, Brian | Date | [xsl] Utilizing dual processors wit, Robert Ogden |
Month |