Hello, Gadrin77!
You wrote on 13 May 2004 09:27:22 -0700:
[Sorry, skipped]
G> thanks Alex,
G> here's the current incarnation (which I've edited and re-edited
G> several
G> times).
G> I'm still new to XSL and forgot all about Current()
G> <?xml version='1.0'?>
G> <xsl:stylesheet version="1.0"
G> xmlns

sl="http://www.w3.org/1999/XSL/Transform">
G> <xsl:key name="BonusCategory" match="BonusItem" use="@Name"/>
G> <xsl:template match="/*">
G> <xsl:for-each select="/Bonus/BonusItem[count(. |
G> key('BonusCategory', @Name)[1])=1]">
G> <!-- <xsl:sort select="@Name" order="ascending"/> -->
G> <xsl:value-of select="@Name"/>
G> <xsl:text>:</xsl:text><xsl:text> </xsl:text>
G> <xsl:value-of select="@Value"/>
G> <br/>
G> </xsl:for-each>
G> </xsl:template>
Here you just get value of the first BonusItem in the group. If you want to
get sum of all values in corresponding group of items, the code will looks
like:
<xsl:value-of select="@Name"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="sum(key('BonusCategory', @Name)/@Value)" />
<br/>
With best regards, Alex Shirshov.