This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Variation on a Grouping Question
- To: "'XSL-List at mulberrytech dot com'" <XSL-List at mulberrytech dot com>
- Subject: RE: Variation on a Grouping Question
- From: Raj Muchhala <rmuchhala at perryjudds dot com>
- Date: Mon, 25 Sep 2000 16:48:31 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
Thanks Gary for your response. Unfortunately your first solution:
--> <xsl:apply-templates select="z:row[@job_number = $job
--> and generate-id(.) = generate-id(key('by_city', @city)[@job_number =
--> $job])]" >
works only for a small xml file. Running it against the full file with over
9K records froze the client...
I did, however, come up with a different method that runs alot faster:
Define the key like this:
--> <xsl:key name="group_by_city" match="/xml/rs:data/z:row"
use="concat(@job_number, '::', @city)" />
And use an 'apply-templates select' like this:
--> <xsl:apply-templates select="*[@city and
generate-id(.)=generate-id(key('group_by_city', concat(@job_number, '::',
@city))) and @job_number = $job]">
Cheers,
Raj
rmuchhala@perryjudds.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list