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

RE: Transform XML to HTML table with multiple columns

Subject: RE: Transform XML to HTML table with multiple columns and lines.
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 6 Nov 2001 21:33:37 -0000
html multiple columns
Yes, it can be done. It's a grouping problem, so read
http://www.jenitennison.com/xslt/grouping. If you want to use Muenchian
grouping you'll have to move off xt, which doesn't support keys.

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Johan
> Andersson
> Sent: 06 November 2001 18:11
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Transform XML to HTML table with multiple columns and
> lines.
>
>
> Hi all!
>
> I use XP/SAX and Java to produce XML and XT to transform it to HTML.
> Lets say I have this XML put out from my Java application:
>
> <Sales>
>   <Occasion>
>     <Salesperson>Mr Nisse</Name>
>     <Time>1999-12-23 18:37:00</Time>
>     <Amount>369</Amount>
>   </Occasion>
>   <Occasion>
>     <Salesperson>Nils Holgersson</Name>
>     <Time>1999-12-23 18:39:33</Time>
>     <Amount>750</Amount>
>   </Occasion>
>   <Occasion>
>     <Salesperson>Sven Lindberg</Name>
>     <Time>1999-12-23 18:45:03</Time>
>     <Amount>1500</Amount>
>   </Occasion>
>   <Occasion>
>     <Salesperson>Mr Nisse</Name>
>     <Time>1999-12-23 19:58:57</Time>
>     <Amount>900</Amount>
>   </Occasion>
>   <Occasion>
>     <Salesperson>Sven Lindberg</Name>
>     <Time>1999-12-23 19:58:57</Time>
>     <Amount>3000</Amount>
>   </Occasion>
> </Sales>
>
> And this is my desired HTML output:
>
> <html>
> ...
> <body>
> <table border="1">
> <tr>
>   <th>Time</th>
>   <th>Mr Nisse</th>
>   <th>Nils Holgersson</th>
>   <th>Sven Lindberg</th>
> </tr>
> <tr>
>   <th>1999-12-23 18:37:21</th>
>   <td>369</td>
>   <td></td>
>   <td></td>
> </tr>
> <tr>
>   <th>1999-12-23 18:39:33</th>
>   <td></td>
>   <td>750</td>
>   <td></td>
> </tr>
> <tr>
>   <th>1999-12-23 18:45:03</th>
>   <td></td>
>   <td></td>
>   <td>1500</td>
> </tr>
> <tr>
>   <th>1999-12-23 19:58:57</th>
>   <td>900</td>
>   <td></td>
>   <td>3000</td>
> </tr>
> </table>
> </body>
> </html>
>
> Is there anyone who can give me a hint about what to put
> in the xsl stylesheet to get this HTML output? Can this be done?
> I am grateful for any suggestion or hint.
>
>
> Thanks in advance.
> ___________________________
> Johan Andersson
> Affectus AB
> Therese Svenssons gata 10
> 417 55 Göteborg, Sweden
> http://www.affectus.se
>
> +46(0)31-744 50 72
> johan.andersson@xxxxxxxxxxx
>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.