Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Grouping within a group? >Thread Next - Re: Grouping within a group? Re: Grouping within a group?To: NULL Date: 7/2/2009 6:43:00 PM Chris Gannon wrote: > I have a dataview recordset being returned where each record/Row > contains the following fields @Meeting_x0020_Date and > @bsc_SiteProperties, and several others like @Title, etc. > > When I group the items on the @bsc_SiteProperties field, they display > the groups in alphabetical order. > > I would like to display them in ascending order according to the > @Meeting_x0020_Date field. > > One way to do this would be to group first on the @Meeting_x0020_Date > field, then group on the @bsc_SiteProperties field but this seems to > be beyond my capabilities. Meeting Date sounds like the attribute contains a date. What format does that date have? Is that a sortable format like yyyy-mm-dd? As for the grouping, do you use XSLT 2.0 or 1.0? With XSLT 2.0 you would simply use two nested xsl:for-each-group elements e.g. <xsl:for-each-group select="row" group-by="@Meeting_x0020_Date"> <xsl:for-each-group select="current-group()" group-by="@bsc_SiteProperties"> With XSLT 1.0 you need to use Muenchian grouping with two keys where the second key concatenates the two attribute values (with some separator character). See http://www.biglist.com/lists/xsl-list/archives/200101/msg00070.html If you need more help then please show us a code sample of the XML input so that we have some data to write an XSLT stylesheet against. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
