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
Generic JScript Function To Load XML Data
WebCube Report - Browser-based Multidimensional Data Reporting
The pow(a, b) function
Re: Missing constant definition
A simple template to display singular and plural counts
swapping two integer values without using temporary
Debugging script
Combinations of k out of n numbers
Permutations of the values of N nodes
What is BEEP (BXXP)?
Family Tree maker
Alternative Ordering - ""Women and Children to the lifeboats first""
Meta-Patterns: Design Patterns Explained
XML Helper functions in Visual Basic
nodeset of child templates using document()
Converting INI files to XML
Table with more than one column
Create an N-Column Table from XML node-set
Fullxml 2


 
 

<< System.XMLWCF, WS, SOAP >>


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

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