Re: Teatment of <th> inside HDITA documents
Hussein Shafie <[email protected]> Thu, 8 Aug 2024 16:36:01 +0200
| Newsgroups | gmane.editors.xxe.general |
|---|---|
| Message-ID | <[email protected]> |
On 8/7/24 23:09, Leif Halvard Silli wrote: > In the document about Lightweight DITA support in XMLmind, it is > mentioned that «most HTML5 elements are faithfully translated to their > DITA equivalent», and then some exceptions are mentioned. [1] > > However, one exception that seems to not be mentioned, is that DITA > Converter (basically and/or literally) convertes the <th> element to a > <td> element (with center aligned text) whenever the <th> element occurs > any other place than inside a <thead> element. Thus, if it occurs ina > <tbody> element, the <th> becomes a <td style="text-align:center">. > > If this is how it is meant to be, then it would be fair to mention this > in the hditaSupport document. Also, I would recomment to **bolden* the > text, so that it looks like a heading: <td > style="text-align:center;font-weight:bold;">. > > When I look at the ordinary DITA implementation in XMLmind, then I note > that row headings (that is: <th> inside <tbody>) are not supported. > > Is this because DITA does not envision that row headings are necessary? > > [1] > https://www.xmlmind.com/ditac/_distrib/doc/manual/hditaSupport.html#hditaSupport > I'm sorry but I don't understand any of this. «most HTML5 elements are faithfully translated to their DITA equivalent», yes, hence HTML <td> and <th> are both translated to a DITA <entry>. (DITA has simplified CALS tables, http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part2-tech-content/langRef/base/table.html, and also <simpletable>s, http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part2-tech-content/langRef/base/simpletable.html.) I've attached sample Lightweight DITA "sample.ditamap" referencing sample HDITA "table.xhtml", itself containing a non-trivial table. When I convert "sample.ditamap" to PDF or to an HTML page, everything looks just fine to me. May be you have found an issue with the way a DITA (simplified CALS) <table> is converted to HTML, but this issue, if any, would not be related to the HDITA support in our Lightweight DITA implementation. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support
sample.ditamap
(text/xml, 242 B)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Map//EN"
"lw-map.dtd">
<map>
<topicmeta>
<navtitle>A sample <b>LwDITA</b> map</navtitle>
</topicmeta>
<topicref href="table.html"/>
</map>
table.html
(text/html, 2.4 KB)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>Sample HDita table</title>
</head>
<body><article><h1>Sample HDita table</h1><table border="1" id="table3">
<caption>A <code>table</code> containing a <code>thead</code>, a
<code>tfoot</code> and a <code>tbody</code>.</caption>
<colgroup style="width: 16%"></colgroup>
<colgroup style="width: 16%"></colgroup>
<colgroup style="width: 39%"></colgroup>
<colgroup style="width: 15%"></colgroup>
<colgroup style="width: 14%"></colgroup>
<thead>
<tr>
<th colspan="5" scope="colgroup">Community Courses — Bath Autumn
1997</th>
</tr>
<tr>
<th abbr="Name" scope="col">Course Name</th>
<th abbr="Tutor" scope="col">Course Tutor</th>
<th scope="col">Summary</th>
<th scope="col">Code</th>
<th scope="col">Fee</th>
</tr>
</thead>
<tbody>
<tr>
<td>After the Civil War</td>
<td>Dr. John Wroughton</td>
<td>The course will examine the turbulent years in England after
1646. <em>6 weekly meetings starting Monday 13th October.</em></td>
<th>H27</th>
<td style="text-align: right;">£32</td>
</tr>
<tr>
<td>An Introduction to Anglo-Saxon England</td>
<td>Mark Cottle</td>
<td>One day course introducing the early medieval period
reconstruction the Anglo-Saxons and their society. <em>Saturday 18th
October.</em></td>
<th>H28</th>
<td style="text-align: right;">£18</td>
</tr>
<tr>
<td>The Glory that was Greece</td>
<td>Valerie Lorenz</td>
<td>Birthplace of democracy, philosophy, heartland of theater, home
of argument. The Romans may have done it but the Greeks did it
first. <em>Saturday day school 25th October 1997</em></td>
<th>H30</th>
<td style="text-align: right;">£18</td>
</tr>
</tbody>
<tfoot>
<tr>
<th abbr="Name" scope="col">Course Name</th>
<th abbr="Tutor" scope="col">Course Tutor</th>
<th scope="col">Summary</th>
<th scope="col">Code</th>
<th scope="col">Fee</th>
</tr>
</tfoot>
</table></article></body>
</html>