RE: [xsl] Yet another grouping question

Subject: RE: [xsl] Yet another grouping question
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Wed, 8 Jan 2003 12:05:01 -0700
> From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx]
> Sent: Wednesday, January 08, 2003 10:30 AM
> Subject: RE: [xsl] Yet another grouping question
> 
> 
> At 2003-01-08 10:09 -0700, Martinez, Brian wrote:
> >returning a node-set from the tables in all files instead of
> >iterating through each file seems to make more sense.  
> However, that does
> >present a secondary grouping problem--your stylesheet 
> outputs a separate
> >country node for each city.  I think combining your approach 
> with Niko's
> >suggestion of doing a second pass on the output (and using a 
> key) will do
> >the trick.
> 
> Not necessarily ... I think the modification below should 
> work.  You have 
> all the information at hand in the source node tree.  The 
> code below groups 
> by country name, and then within that subset groups by city name.
> 
> I hope this helps.

Awesome . . . that works perfectly, and is actually pretty fast (1:12 to
process 204 files, comprising over 2200 table rows, on Saxon/Win2K).  Thanks
again.  I'm not sure I understand yet how you use generate-id in this
approach, but I think I'll figure it out from looking through the FAQ again.

(Now I get to do this again for U.S. airports--their stylesheets are
formatted differently, and I have to generate a "state-province" node, plus
make a distinction between commercial/non-commercial airports, which will
introduce even more grouping issues--but I think I can take it from here.)

thanks,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread