[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: how to sort after applying generate-id()?

Subject: Re: how to sort after applying generate-id()?
From: Mukul Gandhi <mukulgw3@xxxxxxxxx>
Date: Tue, 14 Oct 2003 18:23:55 -0700 (PDT)
fop generate id
I feel, it should be possible with xsl:sort .. Its
difficult to understand where xsl:for-each starts in
the XSL, and for what purpose you are using
generate-id .. It *seems you want to do Muenchian
grouping *.. 

If you can clarify the problem more -- 
the XML structure(at least provide 2,3 more <ENTITY>
tags), 

complete the missing parts of XSL(I cannot see the
attribute TOTAL_FUND_VALUE_NET, which you have
mentioned in XSL), 

how you want the grouping to be done, and 

the desired output .. somebody can give suggestion..

Regards,
Mukul

--- "Lee, Insoo" <Insoo.Lee@xxxxxx> wrote:
> 
> 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
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.