[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Another grouping question

Subject: Re: Another grouping question
From: "James Cummings" <cummings.james@xxxxxxxxx>
Date: Mon, 25 Feb 2008 14:13:55 +0000
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.