This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Variation on a Grouping Question



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]