Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - RE: XSL table problems XSL table problemsTo: 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! | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
