Subject: Re: [xsl] [answered] collecting multiple tokenize() results into one sequence From: Michael Müller-Hillebrand <mmh@xxxxxxxxxxxxx> Date: Fri, 25 Jul 2008 10:13:55 +0200 |
Is praise for XSLT and for the generous specialists on this list on topic? I hope so...
This mental update to the unlimited power of XSLT 2.0 reminds me, how difficult/important it is to overcome existing thought patterns. I, too, would have assumed that the process of grouping divides the selected sequence into disjunct groups. But no, it does a lot more and this is described very precisely in the Programmers Reference -- which I know, because I immediately reread the description of xsl:for- each-group.
How about:
<xsl:for-each-group select="//item" group-by="tokenize(meta,',')"> <xsl:sort select="current-grouping-key()"/> <h2><xsl:value-of select="current-grouping-key()"/>:</h2> <ul> <xsl:for-each select="current-group()"> <xsl:sort select="name"/> <li>...
Grouping does not require that there be a single grouping key for each item grouped, and an item may appear in more than one group.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [answered] collecting mul, Wendell Piez | Thread | [xsl] Sum one attribute while group, DB |
Re: [xsl] impossible to implement t, Christoph Naber | Date | [xsl] create xml from incoming xml , sudheshna iyer |
Month |