Uncategorized
Uncategorized Contents
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>
<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
Thanks for your help.
SunFu Yang
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting