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

different crosstables from xml data

Subject: different crosstables from xml data
From: friepoertner <friepoertner@xxxxxxxxxxxxx>
Date: Tue, 23 Oct 2001 12:40:08 +0200
xml sum column
Hi list,

I have to generate html crosstables with different headers
from xml-files using xsl stylesheets.

I generate XML Data like this:

<crosstab title="area" sum_col="1" sum_row="1" absolute="1" relative="1">
<row title="north">
 <column title="gender">
   <column title="male">
     <column title="abs." type="absolute">20</column>
     <column title="rel." type="relative">40</column>
   </column>
   <column title="female">
     <column title="abs." type="absolute">30</column>
     <column title="rel." type="relative">60</column>
   </column>
 </column>
 <column title="foo">
   [...]
</row>
<row title="east">
 <column title="gender">
   <column title="male">
   [...]

</crosstab>

the output should create tables with the right col- and
rowspan as well as optional sum-column / sum-row. When
there is only one option absolute/relative selected, the
header row 'abs' or 'rel' should be ignored.

Example Output:

<table>
<tr>
<td rowspan="3">area</td><td colspan="4">gender</td><td colspan="2">foo ... </tr>
<tr><td colspan="2">male</td><td colspan="2">female</td> ... </tr>
<tr><td>abs.</td><td>rel.</td><td>abs.</td> ... </tr>
<tr><td>north</td><td>20</td><td>40 %</td> ... </tr>
<tr><td>east</td><td>10</td><td>20 %</td> ... </tr>
[...]
<tr><td>sum</td><td>30</td><td>60 %</td> ... </tr>


or the same without relative values:

<table>
<tr>
<td rowspan="2">area</td><td colspan="2">gender</td><td colspan="1">foo ... </tr>
<tr><td colspan="1">male</td><td colspan="1">female</td> ... </tr>
<tr><td>north</td><td>20</td><td>30</td> ... </tr>
<tr><td>east</td><td>10</td><td>25</td> ... </tr>


How can I get the colspan / rowspan information? Has someone done this
before? Or should I generate different XML-Source for a better xslt
processing?

Thanks in advance!

IFR

--
Ingo Friepoertner
friepoertner@xxxxxxxxxxxxx


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.