sorting based on substring-before
have this xml:
<EL>aa_123</EL>
<EL>aa_456</EL>
<EL>bb_987</EL>
<EL>cc_111</EL>
<EL>cc_222</EL>
<EL>cc_333</EL>
(this is really kind of data i've to handle)
want to (sub)sort this like this:
aa: 123,456
bb: 987
cc: 111,222,333
have already this:
<xsl:key name="prefix" match="EL" use="substring-before(.,'_')"/>
<xsl:for-each select="EL[count(.| key('prefix',@name)[1]) = 1]">
...
</xsl:for-each>
sort like this now:
aa,aa,bb,cc,cc,cc
but should be (each different substring-before value once):
aa,bb,cc
|