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

Grouping question

Subject: Grouping question
From: Tristan Griffiths <tristan.griffiths@xxxxxxxxxxxx>
Date: Wed, 24 Sep 2003 09:19:17 +1000
tristan griffiths
Hello all, this is my first post so please be nice. After much googling I ended up here. It's a painful problem that I'm sure someone has solved before but google just doesn't seem to find the answer.

I have an XML structure like this:

<Tracklisting>
   <Track>
      <Disk>1</Disk>
      <Track>1</Track>
      <Title>THE PACKAGE</Title>
   </Track>
   <Track>
      <Disk>1</Disk>
      <Track>2</Track>
      <Title>WEAK AND POWERLESS</Title>
   </Track>
   <Track>
      <Disk>1</Disk>
      <Track>3</Track>
      <Title>THE NOOSE</Title>
   </Track>
   <Track>
       ...
   </Track>
</Tracklisting>

I would like to output a HTML table like this:

<table>
   <tr>
      <td colspan="2">Disk 1</td>
   </tr>
   <tr>
      <td>1. THE PACKAGE</td>
      <td>2. WEAK AND POWERLESS</td>
   </tr>
   <tr>
      <td>3. THE NOOSE</td>*
      *<td></td>
   </tr>
</table>

So basically it is a balanced, two column table, down and across. Is this possible with XSLT? I have experimented with keys but I'm afraid I have even less of an understanding of them now than I did before. I've just gotten confused.

Little help?


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.