Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSL table problems

From: tayze@-----.---
To: NULL
Date: 1/5/2007 10:02:00 AM

Hi, I have some XML that needs to be translated into a properly
formatted table, however, rather than having a cell with rowspan or
colspan attributes there is a separate cell with rowspan or colspan as
the cell contents.  See the following code ...

<table class="wikitable">
<row style="background: #efefef;">
<cell>
 rowspan = "2"
</cell><cell>
 Canada
</cell><cell>
 rowspan = "2"
</cell><cell>
 Governor General
</cell><cell>
 rowspan = "2"
</cell><cell>
 Prime Minister
</cell><cell>
 colspan = "2"
</cell><cell>
 Parliament
</cell><cell>
 colspan = "2"
</cell><cell>
 Parliamentarian
</cell></row><row style="background: #efefef;">
<cell>
 Senate
</cell><cell>
 House of Commons
</cell><cell>
 Senator
</cell><cell>
 Member of Parliament
</cell></row><row >
<cell>
 Quebec
</cell><cell rowspan="5">
 Lieutenant-Governor
</cell><cell rowspan="6">
 Premier
</cell><cell rowspan="6">
 n/a
</cell><cell>
 National Assembly
</cell><cell rowspan="6">
 n/a
</cell><cell>
 Member of the National Assembly
</cell></row><row >
<cell>
 Ontario
</cell><cell>
 Legislative Assembly
</cell><cell>
 Member of the Provincial Parliament
</cell></row><row >
<cell>
 Newfoundland and Labrador
</cell><cell rowspan="2">
 House of Assembly
</cell><cell>
 Member of the House of Assembly
</cell></row><row >
<cell>
 Nova Scotia
</cell><cell rowspan="3">
 Member of the Legislative Assembly
</cell></row><row >
<cell>
 Other provinces
</cell><cell rowspan="2">
 Legislative Assembly
</cell></row></table>

This should translate roughly to the following HTML ...

<table class="wikitable">
<tr style="background: #efefef;">
<th rowspan="2">Canada</th>
<th rowspan="2">Governor General</th>
<th rowspan="2">Prime Minister</th>
<th colspan="2">Parliament</th>
<th colspan="2">Parliamentarian</th>
</tr>
<tr style="background: #efefef;">
<th>Senate</th>
<th>House of Commons</th>
<th>Senator</th>
<th>Member of Parliament</th>
</tr>
<tr>
<th style="text-align: left;">Quebec</th>
<td rowspan="5">Lieutenant-Governor</td>
<td rowspan="5">Premier</td>
<td rowspan="6">n/a*</td>
<td>National Assembly</td>
<td rowspan="6">n/a</td>
<td>Member of the National Assembly</td>
</tr>
<tr>
<th style="text-align: left;">Ontario</th>
<td>Legislative Assembly</td>
<td>Member of the Provincial Parliament</td>
</tr>
<tr>
<th style="text-align: left;">Newfoundland and Labrador</th>
<td rowspan="2">House of Assembly</td>
<td>Member of the House of Assembly</td>
</tr>
<tr>
<th style="text-align: left;">Nova Scotia</th>
<td rowspan="3">Member of the Legislative Assembly</td>
</tr>
<tr>
<th style="text-align: left;">Other provinces</th>
<td rowspan="2">Legislative Assembly</td>
</tr>
</table>

Any suggestions would be appreciated!



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent