This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Table breaks AND multi-level sorting (and confusion)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Table breaks AND multi-level sorting (and confusion)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 7 Feb 2001 11:51:47 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
This definitely calls for a two-pass transformation: first sort, then
arrange into columns. Either use the node-set() extension function to turn
the output of the first pass into the input of the second, or use two
separate stylesheets.
Incidentally, it's very confusing to be told that you want the output five
columns wide and then be given sample output that is two columns wide.
Perhaps that's why you chose the subject heading you did.
Mike Kay
> Given the following XML:
>
> <response>
> <item type="a" name="abc"/>
> <item type="b" name="yyy"/>
> <item type="a" name="xyz"/>
> <item type="a" name="cde"/>
> <item type="b" name="aaa"/>
> ...
> </response>
>
> I need to generate to generate a table in HTML that is 5
> columns wide, sorted fiorst by type and second by name such as this:
>
> <table>
> <tr>
> <td>abc</td>
> <td>cde</td>
> </tr>
> <tr>
> <td>xyz</td>
> <td>aaa</td>
> </tr>
> <tr>
> <td>yyy</td>
> <td></td>
> </tr>
> ...
> </table>
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list