Hi,

  i have problem with table conversion from xml to html using xslt. i converted rowspan and colspan in separate row(entry), but if both rowspan and colspan come in single row(entry, colspan and rowspan) is not converting. i have tried so many ways but i didn't get the exact output. kindly suggest to me. 
  I have attached input file as xml and png file for your references.

Reference Table
5b42c8ea0cecd6373b6acd405b28322d
Input xml file

     <?xml version="1.0" encoding="UTF-8"?>
     <table>
<name>Table A(2b)<line.break/>Attributable Ownership Interest by Ethnicity<line.break/>Stations with One or More Attributable Persons<line.break/>Full Power Commercial Television Stations - 2013</name>
<tgroup frame="all" cols="10" rowsep="1" colsep="1">
<colspec colnum="1" colname="col1" colwidth="20*" align="left"/>
<colspec colnum="2" colname="col2" colwidth="16*" align="left"/>
<colspec colnum="3" colname="col3" colwidth="8*" align="right"/>
<colspec colnum="4" colname="col4" colwidth="8*" align="right"/>
<colspec colnum="5" colname="col5" colwidth="8*" align="right"/>
<colspec colnum="6" colname="col6" colwidth="8*" align="right"/>
<colspec colnum="7" colname="col7" colwidth="8*" align="right"/>
<colspec colnum="8" colname="col8" colwidth="8*" align="right"/>
<colspec colnum="9" colname="col9" colwidth="8*" align="right"/>
<colspec colnum="10" colname="col10" colwidth="8*" align="right"/>
<spanspec namest="col3" nameend="col10" spanname="sp1" align="center"/>
<spanspec namest="col3" nameend="col4" spanname="sp2" align="center"/>
<spanspec namest="col5" nameend="col6" spanname="sp3" align="center"/>
<spanspec namest="col7" nameend="col8" spanname="sp4" align="center"/>
<spanspec namest="col9" nameend="col10" spanname="sp5" align="center"/>
<spanspec namest="col1" nameend="col2" spanname="sp6" align="left"/>
<thead>
<row>
<entry spanname="sp6" morerows="2" align="center"><text>Ethnicity</text></entry>
<entry spanname="sp1"><text>No. of Stations and Percent of Total</text></entry>
</row>
<row>
<entry spanname="sp2"><text>Nationally</text></entry>
<entry spanname="sp3"><text>Nielsen<line.break/>DMA 1-50</text></entry>
<entry spanname="sp4"><text>DMA<line.break/>51-100</text></entry>
<entry spanname="sp5"><text>DMA<line.break/>101+</text></entry>
</row>
<row>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
</row>
</thead>
<tbody>
<row>
<entry morerows="2"><text><emph face="B">Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>96</text></entry>
<entry><text>7.7</text></entry>
<entry><text>69</text></entry>
<entry><text>14.8</text></entry>
<entry><text>9</text></entry>
<entry><text>2.7</text></entry>
<entry><text>18</text></entry>
<entry><text>4.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>274</text></entry>
<entry><text>22.1</text></entry>
<entry><text>153</text></entry>
<entry><text>32.9</text></entry>
<entry><text>56</text></entry>
<entry><text>17.0</text></entry>
<entry><text>65</text></entry>
<entry><text>14.6</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">322</emph></text></entry>
<entry><text><emph face="B">26.0</emph></text></entry>
<entry><text>189</text></entry>
<entry><text>40.6</text></entry>
<entry><text>64</text></entry>
<entry><text>19.4</text></entry>
<entry><text>69</text></entry>
<entry><text>15.5</text></entry>
</row>
<row>
<entry morerows="2"><text><emph face="B">Non-Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>984</text></entry>
<entry><text>79.4</text></entry>
<entry><text>404</text></entry>
<entry><text>86.9</text></entry>
<entry><text>273</text></entry>
<entry><text>82.7</text></entry>
<entry><text>307</text></entry>
<entry><text>69.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>1,201</text></entry>
<entry><text>96.9</text></entry>
<entry><text>458</text></entry>
<entry><text>98.5</text></entry>
<entry><text>327</text></entry>
<entry><text>99.1</text></entry>
<entry><text>416</text></entry>
<entry><text>93.7</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">1,210</emph></text></entry>
<entry><text><emph face="B">97.7</emph></text></entry>
<entry><text>460</text></entry>
<entry><text>98.9</text></entry>
<entry><text>329</text></entry>
<entry><text>99.7</text></entry>
<entry><text>421</text></entry>
<entry><text>94.8</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Total stations</emph></text></entry>
<entry><text><emph face="B">1,239</emph></text></entry>
<entry><text><emph face="B">100%</emph></text></entry>
<entry><text>465</text></entry>
<entry><text>100%</text></entry>
<entry><text>330</text></entry>
<entry><text>100%</text></entry>
<entry><text>444</text></entry>
<entry><text>100%</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Insufficient data</emph></text></entry>
<entry><text>147</text></entry>
<entry><text>---</text></entry>
<entry><text>75</text></entry>
<entry><text>---</text></entry>
<entry><text>30</text></entry>
<entry><text>---</text></entry>
<entry><text>42</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Stations not filed</emph></text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">All licensed stations</emph></text></entry>
<entry><text><emph face="B">1,387</emph></text></entry>
<entry><text>---</text></entry>
<entry><text>540</text></entry>
<entry><text>---</text></entry>
<entry><text>360</text></entry>
<entry><text>---</text></entry>
<entry><text>487</text></entry>
<entry><text>---</text></entry>
</row>
</tbody>
</tgroup>
</table>



<?xml-stylesheet type="text/xsl" href="FCC_Template.xsl"?><table>
<name>Table A(2b)<line.break/>Attributable Ownership Interest by Ethnicity<line.break/>Stations with One or More Attributable Persons<line.break/>Full Power Commercial Television Stations - 2013</name>
<tgroup frame="all" cols="10" rowsep="1" colsep="1">
<colspec colnum="1" colname="col1" colwidth="20*" align="left"/>
<colspec colnum="2" colname="col2" colwidth="16*" align="left"/>
<colspec colnum="3" colname="col3" colwidth="8*" align="right"/>
<colspec colnum="4" colname="col4" colwidth="8*" align="right"/>
<colspec colnum="5" colname="col5" colwidth="8*" align="right"/>
<colspec colnum="6" colname="col6" colwidth="8*" align="right"/>
<colspec colnum="7" colname="col7" colwidth="8*" align="right"/>
<colspec colnum="8" colname="col8" colwidth="8*" align="right"/>
<colspec colnum="9" colname="col9" colwidth="8*" align="right"/>
<colspec colnum="10" colname="col10" colwidth="8*" align="right"/>
<spanspec namest="col3" nameend="col10" spanname="sp1" align="center"/>
<spanspec namest="col3" nameend="col4" spanname="sp2" align="center"/>
<spanspec namest="col5" nameend="col6" spanname="sp3" align="center"/>
<spanspec namest="col7" nameend="col8" spanname="sp4" align="center"/>
<spanspec namest="col9" nameend="col10" spanname="sp5" align="center"/>
<spanspec namest="col1" nameend="col2" spanname="sp6" align="left"/>
<thead>
<row>
<entry spanname="sp6" morerows="2" align="center"><text>Ethnicity</text></entry>
<entry spanname="sp1"><text>No. of Stations and Percent of Total</text></entry>
</row>
<row>
<entry spanname="sp2"><text>Nationally</text></entry>
<entry spanname="sp3"><text>Nielsen<line.break/>DMA 1-50</text></entry>
<entry spanname="sp4"><text>DMA<line.break/>51-100</text></entry>
<entry spanname="sp5"><text>DMA<line.break/>101+</text></entry>
</row>
<row>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
</row>
</thead>
<tbody>
<row>
<entry morerows="2"><text><emph face="B">Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>96</text></entry>
<entry><text>7.7</text></entry>
<entry><text>69</text></entry>
<entry><text>14.8</text></entry>
<entry><text>9</text></entry>
<entry><text>2.7</text></entry>
<entry><text>18</text></entry>
<entry><text>4.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>274</text></entry>
<entry><text>22.1</text></entry>
<entry><text>153</text></entry>
<entry><text>32.9</text></entry>
<entry><text>56</text></entry>
<entry><text>17.0</text></entry>
<entry><text>65</text></entry>
<entry><text>14.6</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">322</emph></text></entry>
<entry><text><emph face="B">26.0</emph></text></entry>
<entry><text>189</text></entry>
<entry><text>40.6</text></entry>
<entry><text>64</text></entry>
<entry><text>19.4</text></entry>
<entry><text>69</text></entry>
<entry><text>15.5</text></entry>
</row>
<row>
<entry morerows="2"><text><emph face="B">Non-Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>984</text></entry>
<entry><text>79.4</text></entry>
<entry><text>404</text></entry>
<entry><text>86.9</text></entry>
<entry><text>273</text></entry>
<entry><text>82.7</text></entry>
<entry><text>307</text></entry>
<entry><text>69.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>1,201</text></entry>
<entry><text>96.9</text></entry>
<entry><text>458</text></entry>
<entry><text>98.5</text></entry>
<entry><text>327</text></entry>
<entry><text>99.1</text></entry>
<entry><text>416</text></entry>
<entry><text>93.7</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">1,210</emph></text></entry>
<entry><text><emph face="B">97.7</emph></text></entry>
<entry><text>460</text></entry>
<entry><text>98.9</text></entry>
<entry><text>329</text></entry>
<entry><text>99.7</text></entry>
<entry><text>421</text></entry>
<entry><text>94.8</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Total stations</emph></text></entry>
<entry><text><emph face="B">1,239</emph></text></entry>
<entry><text><emph face="B">100%</emph></text></entry>
<entry><text>465</text></entry>
<entry><text>100%</text></entry>
<entry><text>330</text></entry>
<entry><text>100%</text></entry>
<entry><text>444</text></entry>
<entry><text>100%</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Insufficient data</emph></text></entry>
<entry><text>147</text></entry>
<entry><text>---</text></entry>
<entry><text>75</text></entry>
<entry><text>---</text></entry>
<entry><text>30</text></entry>
<entry><text>---</text></entry>
<entry><text>42</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Stations not filed</emph></text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">All licensed stations</emph></text></entry>
<entry><text><emph face="B">1,387</emph></text></entry>
<entry><text>---</text></entry>
<entry><text>540</text></entry>
<entry><text>---</text></entry>
<entry><text>360</text></entry>
<entry><text>---</text></entry>
<entry><text>487</text></entry>
<entry><text>---</text></entry>
</row>
</tbody>
</tgroup>
</table>

Regards,
Balaji V

Attachments Fcc_table.png 78.44 KB

Sorry for the delay....

I pasted xml file below.

<?xml-stylesheet type="text/xsl" href="FCC_Template.xsl"?><table>
<name>Table A(2b)<line.break></line>Attributable Ownership Interest by Ethnicity<line.break></line>Stations with One or More Attributable Persons<line.break></line>Full Power Commercial Television Stations - 2013</name>
<tgroup frame="all" cols="10" rowsep="1" colsep="1">
<colspec colnum="1" colname="col1" colwidth="20" align="left"/>
<colspec colnum="2" colname="col2" colwidth="16
" align="left"/>
<colspec colnum="3" colname="col3" colwidth="8" align="right"/>
<colspec colnum="4" colname="col4" colwidth="8
" align="right"/>
<colspec colnum="5" colname="col5" colwidth="8" align="right"/>
<colspec colnum="6" colname="col6" colwidth="8
" align="right"/>
<colspec colnum="7" colname="col7" colwidth="8" align="right"/>
<colspec colnum="8" colname="col8" colwidth="8
" align="right"/>
<colspec colnum="9" colname="col9" colwidth="8" align="right"/>
<colspec colnum="10" colname="col10" colwidth="8
" align="right"/>
<spanspec namest="col3" nameend="col10" spanname="sp1" align="center"></spanspec>
<spanspec namest="col3" nameend="col4" spanname="sp2" align="center"></spanspec>
<spanspec namest="col5" nameend="col6" spanname="sp3" align="center"></spanspec>
<spanspec namest="col7" nameend="col8" spanname="sp4" align="center"></spanspec>
<spanspec namest="col9" nameend="col10" spanname="sp5" align="center"></spanspec>
<spanspec namest="col1" nameend="col2" spanname="sp6" align="left"></spanspec>
<thead>
<row>
<entry spanname="sp6" morerows="2" align="center"><text>Ethnicity</text></entry>
<entry spanname="sp1"><text>No. of Stations and Percent of Total</text></entry>
</row>
<row>
<entry spanname="sp2"><text>Nationally</text></entry>
<entry spanname="sp3"><text>Nielsen<line.break></line>DMA 1-50</text></entry>
<entry spanname="sp4"><text>DMA<line.break></line>51-100</text></entry>
<entry spanname="sp5"><text>DMA<line.break></line>101+</text></entry>
</row>
<row>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
<entry align="center"><text>No.</text></entry>
<entry align="center"><text>%</text></entry>
</row>
</thead>
<tbody>
<row>
<entry morerows="2"><text><emph face="B">Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>96</text></entry>
<entry><text>7.7</text></entry>
<entry><text>69</text></entry>
<entry><text>14.8</text></entry>
<entry><text>9</text></entry>
<entry><text>2.7</text></entry>
<entry><text>18</text></entry>
<entry><text>4.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>274</text></entry>
<entry><text>22.1</text></entry>
<entry><text>153</text></entry>
<entry><text>32.9</text></entry>
<entry><text>56</text></entry>
<entry><text>17.0</text></entry>
<entry><text>65</text></entry>
<entry><text>14.6</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">322</emph></text></entry>
<entry><text><emph face="B">26.0</emph></text></entry>
<entry><text>189</text></entry>
<entry><text>40.6</text></entry>
<entry><text>64</text></entry>
<entry><text>19.4</text></entry>
<entry><text>69</text></entry>
<entry><text>15.5</text></entry>
</row>
<row>
<entry morerows="2"><text><emph face="B">Non-Hispanic or Latino</emph></text></entry>
<entry rowsep="0"><text>Female</text></entry>
<entry><text>984</text></entry>
<entry><text>79.4</text></entry>
<entry><text>404</text></entry>
<entry><text>86.9</text></entry>
<entry><text>273</text></entry>
<entry><text>82.7</text></entry>
<entry><text>307</text></entry>
<entry><text>69.1</text></entry>
</row>
<row>
<entry rowsep="0"><text>Male</text></entry>
<entry><text>1,201</text></entry>
<entry><text>96.9</text></entry>
<entry><text>458</text></entry>
<entry><text>98.5</text></entry>
<entry><text>327</text></entry>
<entry><text>99.1</text></entry>
<entry><text>416</text></entry>
<entry><text>93.7</text></entry>
</row>
<row>
<entry><text><emph face="B">Total</emph></text></entry>
<entry><text><emph face="B">1,210</emph></text></entry>
<entry><text><emph face="B">97.7</emph></text></entry>
<entry><text>460</text></entry>
<entry><text>98.9</text></entry>
<entry><text>329</text></entry>
<entry><text>99.7</text></entry>
<entry><text>421</text></entry>
<entry><text>94.8</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Total stations</emph></text></entry>
<entry><text><emph face="B">1,239</emph></text></entry>
<entry><text><emph face="B">100%</emph></text></entry>
<entry><text>465</text></entry>
<entry><text>100%</text></entry>
<entry><text>330</text></entry>
<entry><text>100%</text></entry>
<entry><text>444</text></entry>
<entry><text>100%</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Insufficient data</emph></text></entry>
<entry><text>147</text></entry>
<entry><text>---</text></entry>
<entry><text>75</text></entry>
<entry><text>---</text></entry>
<entry><text>30</text></entry>
<entry><text>---</text></entry>
<entry><text>42</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">Stations not filed</emph></text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>0</text></entry>
<entry><text>---</text></entry>
<entry><text>1</text></entry>
<entry><text>---</text></entry>
</row>
<row>
<entry spanname="sp6"><text><emph face="B">All licensed stations</emph></text></entry>
<entry><text><emph face="B">1,387</emph></text></entry>
<entry><text>---</text></entry>
<entry><text>540</text></entry>
<entry><text>---</text></entry>
<entry><text>360</text></entry>
<entry><text>---</text></entry>
<entry><text>487</text></entry>
<entry><text>---</text></entry>
</row>
</tbody>
</tgroup>
</table>

This article has been dead for over six months. Start a new discussion instead.