[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Another grouping question
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
|
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
|