|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] sum() with selective attribute
Hi, how would I use sum() function along with attribute?
for the given xml shown below, I would get a grand total per each
currency...
I guess I can do something like
sum(/REPORT/ENTITY/FUND_GROUP/ROW/SOME_VALUE) along with "xsl:if", but I'd
like to avoid scanning through the tree again looking up CURRENCY
attribute... any suggestion?
Thanks
<REPORT>
<ENTITY NUMBER="1">
<FUND_GROUP CURRENCY="GBP">
<ROW>
<SOME_VALUE>100</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>200</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>300</SOME_VALUE>
</ROW>
</FUND_GROUP>
<FUND_GROUP CURRENCY="USD">
<ROW>
<SOME_VALUE>100</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>200</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>300</SOME_VALUE>
</ROW>
</FUND_GROUP>
</ENTITY>
<ENTITY NUMBER="2">
<FUND_GROUP CURRENCY="GBP">
<ROW>
<SOME_VALUE>100</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>200</SOME_VALUE>
</ROW>
</FUND_GROUP>
<FUND_GROUP CURRENCY="USD">
<ROW>
<SOME_VALUE>200</SOME_VALUE>
</ROW>
<ROW>
<SOME_VALUE>300</SOME_VALUE>
</ROW>
</FUND_GROUP>
</ENTITY>
</REPORT>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








