Subject: Re: [xsl] Another grouping question From: "James Cummings" <cummings.james@xxxxxxxxx> Date: Mon, 25 Feb 2008 14:13:55 +0000 |
On Mon, Feb 25, 2008 at 2:07 PM, Florent Georges <lists@xxxxxxxxxxxx> wrote: > James Cummings wrote: > Hi > Because of normalize-space(), your sequence is a sequence of strings. > If you want to get the original node in the grouping, group on the > nodes directly. It is hard to tell without knowing your input, but I > guess you want something like: > > <xsl:for-each-group > select="$dMeetingC" > group-by="normalize-space(lower-case(.))"> Yup, this is exactly what I tried for myself moments after posting (*doh* why don't I try these things *before* posting!) What I did was remove the normalize-space(lower-case(.)) from the earlier variable, and put it there on the for-each-group, and then had the following as my date variable: ===== <xsl:variable name="date"> <list type="date"> <xsl:for-each select="current-group()"> <xsl:variable name="thisDate" select="./ancestor::tei:dDay//tei:date[1]/@when"/> <item><ref target="{concat('http://www.example.com/', substring-before($thisDate, '-'), '.xml#p', $thisDate)}"><xsl:value-of select="$thisDate"/></ref> </item> </xsl:for-each> </list> </xsl:variable> ===== With then an <xsl:copy-of select="$date"/> further down when creating the output. Thanks for you help, I should have persevered before posting this time. *sigh* -James
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Another grouping question, Florent Georges | Thread | Re: [xsl] Another grouping question, Florent Georges |
Re: [xsl] Another grouping question, Florent Georges | Date | Re: [xsl] Another grouping question, Florent Georges |
Month |