Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Grouping within a group?

From: Martin Honnen <mahotrash@-----.-->
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent