BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Uncategorized
Grouping with totals/subtotals -- nested Muenchian method
WebCube Report - Browser-based Multidimensional Data Reporting
Re: Missing constant definition
swapping two integer values without using temporary
Debugging script
What is BEEP (BXXP)?
Meta-Patterns: Design Patterns Explained
XML Helper functions in Visual Basic
nodeset of child templates using document()
Converting INI files to XML
Fullxml 2
Sorting the results and use the Axis
TreeMaker
XMLEditor - WebClipping
WDDX Parser
Templx: x++ IDE Released!
XppEngCOM: COM implementation of x++ interpreter
Backup Outlook mail as XML
Grouping and Summing the values in XML
WDDX Parser (updated bug)


 
 

<< System.XMLWCF, WS, SOAP >>


By sun-fu yang
First Posted 05/07/2001
Times viewed 2262

Re: Grouping with totals/subtotals -- nested Muenchian method


Summary How to include the option that code and nr are sorted by subtotal of weight

Your example presents a clear case how to work with muenchian method with subtotal. I am working on the the project using similar technique. But all of the unique code or nr element have to be sorted with complicated computations, for example, using sum function.Then it occurs to me that to repeat sum function computation twice (one for sorting and another for output individually )will incur performance problem or not?  For example:

<xsl:for-each select=key('kNr', .)[count(. | key('kCodeNr', concat(../code, '|', .))[1])=1]>
 
  <xsl:sort select=sum(key('kCodeNr', concat(../code, '|', .))/../weight)/>
 
<nr n={.}>
  <
xsl:value-of select=sum(key('kCodeNr', concat(../code, '|', .))/../weight)/></nr>

Thanks for your help.
SunFu Yang

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< System.XMLWCF, WS, SOAP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML