|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Acheiving ..2nd level grouping but with different
Hi Kumar,
> Here is my XSL with first level grouping extracting distinct regions
> and i am having problems grouping users within Region .
The secret of 2nd level grouping with the Muenchian method is to
create keys that combine the two things that you want to group by.
Your first level key is:
<xsl:key name="distinct-region" match="*" use="@reg"/>
(Though I think it would be better as:
<xsl:key name="distinct-region" match="los" use="@reg"/>
since that would limit it to only holding los elements.)
So your second level key should be something along the lines of:
<xsl:key name="distinct-region-and-user" match="los"
use="concat(@reg, '+', @user)" />
Then, given that you've found a region ($reg), you can get all the
unique users in that region with:
key('distinct-region', $reg)
[generate-id() =
generate-id(key('distinct-region-and-user',
concat($reg, '+', @user)))]
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








