Subject: Re: [xsl] sort problem From: Terry Ofner <tdofner@xxxxxxxxx> Date: Wed, 5 Jan 2011 12:45:11 -0500 |
Thanks Martin, works perfectly now. On Jan 5, 2011, at 11:42 AM, Martin Honnen wrote: > Terry Ofner wrote: >> I am aggregating and sorting long lists of codes in this format: >> >> <list> >> <cc area="W" main="7">W.7</cc> >> <cc area="W" main="8">W.8</cc> >> <cc area="W" main="4">W.4</cc> >> <cc area="W" main="1">W.1</cc> >> <cc area="W" main="1" exp="a">W.1.a</cc> >> <cc area="W" main="1" exp="b">W.1.b</cc> >> <cc area="W" main="1" exp="c">W.1.c</cc> >> <cc area="W" main="7">W.7</cc> >> <cc area="W" main="8">W.8</cc> >> <cc area="W" main="9">W.9</cc> >> </list> >> >> Here is my 2.0 template: >> >> <xsl:template match="list"> >> <list> >> >> <xsl:for-each-group select="." group-by="cc"> >> <xsl:sort select="@area" order="descending"/> >> <xsl:sort select="@main" data-type="number"/> > > You probably want > <xsl:for-each-group select="cc" group-by="."> > <xsl:sort select="@area" order="descending"/> > <xsl:sort select="number(@main)"/> > > > -- > > Martin Honnen > http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] sort problem, Martin Honnen | Thread | [xsl] match first occurrence for wh, Robby Pelssers |
Re: [xsl] sort problem, Martin Honnen | Date | RE: [xsl] Capture Range of Document, Jimenez, Luis |
Month |