|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: tokenize(), grouping problem
On 4/22/05, Jon Crump <jjcrump@xxxxxxxxxxxxxxxx> wrote:
> I can use tokenize() to split the strings at the semicolon, but how can I
> then use the result in a for-each-group group-by procedure to output the
> unique values?
I've still not managed to work out my grouping problem, but this is at
least most a solution for your's:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:template match="data">
<data>
<xsl:for-each-group select="record/subjects"
group-by="tokenize(., '; ')">
<subject>
<xsl:value-of select="current-grouping-key()"/>
</subject>
</xsl:for-each-group>
</data>
</xsl:template>
</xsl:stylesheet>
Bruce
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








