[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Yet another grouping question

Subject: RE: Yet another grouping question
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Wed, 8 Jan 2003 10:09:17 -0700
brian martinez
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.