|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Yet another grouping question
> From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx] > Sent: Wednesday, January 08, 2003 9:18 AM > Subject: Re: Yet another grouping question > > > At 2003-01-08 08:17 -0700, Martinez, Brian wrote: > >Now comes the grouping issue. Cities served by multiple airports are > >repeated in the table: > > > ><tr> > > <td>Buenos Aires</td> > > <td>Jorge Newbery</td> > > <td>AEP</td> > ></tr> > ><tr> > > <td>Buenos Aires</td> > > <td>Ministro Pistarini</td> > > <td>EZE</td> > ></tr> > > > >Obviously I'd like both of these airports listed in one city > node for Buenos > >Aires, but I can't figure out how to modify my stylesheet to > do this. I > >don't think I can use methods involving keys > > Grouping isn't only accomplished through keys ... I often use > variables and > variables work across files. > > I mocked up some data and the following seems to work fine in > a small test. > > I hope this helps. Thanks Ken--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. thanks again, 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
|
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








