[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] different crosstables from xml data
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|