Merged <th> Not Displaying colspan in html output

dgallo
Posts: 89
Joined: Tue Mar 31, 2015 10:43 pm

Merged <th> Not Displaying colspan in html output

Post by dgallo » Wed Jul 26, 2017 7:17 pm

We are using Oxygen 18.1 responsive webhelp to create output.

The first row in the <thead> element is not spanning properly in the html output. It appears the colspan attribute is not being assigned at all to the <th> element inside <thead><tr>...</tr></thead>. If I add it manually, the table appears correctly.

We have a table with the following xml (please note comments in the <thead> element):

Code: Select all

    <table frame="none"
id="square_plate_torsion_example_simulation_results_r_table_mn4_kgj_r1b">
<title>Displacement</title>
<tgroup cols="13">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
<colspec colname="c3" colnum="3"/>
<colspec colname="c4" colnum="4"/>
<colspec colname="c5" colnum="5"/>
<colspec colname="c6" colnum="6"/>
<colspec colname="c7" colnum="7"/>
<colspec colname="c8" colnum="8"/>
<colspec colname="c9" colnum="9"/>
<colspec colname="c10" colnum="10"/>
<colspec colname="c11" colnum="11"/>
<colspec colname="c12" colnum="12"/>
<colspec colname="c13" colnum="13"/>
<thead>
<row>
<entry morerows="1"/>
<entry namest="c2" nameend="c5" valign="middle" align="center">2
<!--This should have a colspan="4"--></entry>
<entry namest="c6" nameend="c9" align="center" valign="middle"
>4<!--This should have a colspan="4"--></entry>
<entry namest="c10" nameend="c11" align="center" valign="middle"
>8<!--This should have a colspan="2"--></entry>
<entry namest="c12" nameend="c13" align="center" valign="middle"
>8<!--This should have a colspan="2"--></entry>
</row>
<row>
<entry valign="middle">Q</entry>
<entry valign="middle">BT</entry>
<entry valign="middle">BT4</entry>
<entry valign="middle">BAZ</entry>
<entry valign="middle">QE</entry>
<entry valign="middle">BT1</entry>
<entry valign="middle">BT4</entry>
<entry valign="middle">BAZ</entry>
<entry valign="middle">DT</entry>
<entry valign="middle">C0</entry>
<entry valign="middle">DT</entry>
<entry valign="middle">C0</entry>
</row>
</thead>
<tbody>
<row>
<entry>IE</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
</row>
<row>
<entry>HE</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
</row>
<row>
<entry>DZ</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
<entry align="center" valign="middle">2.7</entry>
</row>
</tbody>
</tgroup>
</table>

Radu
Posts: 6442
Joined: Fri Jul 09, 2004 5:18 pm

Re: Merged <th> Not Displaying colspan in html output

Post by Radu » Thu Jul 27, 2017 10:20 am

Hi,

Are you using DITA OT 1.8 or 2.x? You can check this out in the Oxygen Preferences->DITA page.
I tested this on my side with Oxygen 18.1 and 19.0, I also added rowsep="1" colsep="1" on the table element to see better how the cells span.
For me the WebHelp output looks like this:

files/table-span-dot2.x.png

and the generated HTML files contain the @colspan numbers specified on the th cells:

Code: Select all

                        <tr>
<th class="entry" rowspan="2" valign="top" id="d3700e61"> </th>
<th class="entry" colspan="4" align="center" valign="middle" id="d3700e63">2
</th>
<th class="entry" colspan="4" align="center" valign="middle" id="d3700e66">4</th>
<th class="entry" colspan="2" align="center" valign="middle" id="d3700e69">8</th>
<th class="entry" colspan="2" align="center" valign="middle" id="d3700e72">8</th>
</tr>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply