Column headings for subcolumns
Post here questions and problems related to editing and publishing DITA content.
Column headings for subcolumns
Hi, I have a table with two columns, and in the second column, one of the cells is subdivided into three columns and three rows. Or rather, that's how it looks in Author mode, but in Text mode you can see that the whole table is actually coded as four columns, and in most of the rows, the right three cells are merged. (I'll paste in the code for the table at the end of this message.) How can I indicate that the first entry in each sub column is a column heading, so our css will be able to apply a bold style? The cells that need to be treated as column headings are the ones below with the contents UTC Offset, Time Zone, and Hours Offset. I considered setting a @class attribute for the entry element, but it seems this may be a semantically incorrect use of the @class attribute. Thanks for any suggestions.
Code: Select all
<table rowheader="firstcol" id="table_jdg_1lb_3jb">
<tgroup cols="4">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="1*"/>
<colspec colname="c3" colnum="3" colwidth="1*"/>
<colspec colname="c4" colnum="4" colwidth="1*"/>
<thead>
<row>
<entry>Question</entry>
<entry outputclass="colspan_3" namest="c2" nameend="c4">Answer</entry>
</row>
</thead>
<tbody>
<row>
<entry>What is xyz?</entry>
<entry outputclass="colspan_3" namest="c2" nameend="c4">Here are the
contents of a cell that is not subdivided into columns.</entry>
</row>
<row>
<entry morerows="4">Why is xyz?</entry>
<entry outputclass="colspan_3" namest="c2" nameend="c4">This is an
introductory sentence.</entry>
</row>
<row>
<entry>UTC Offset</entry>
<entry>Time Zone</entry>
<entry>Hours Offset</entry>
</row>
<row>
<entry>-18000</entry>
<entry>Eastern Standard Time</entry>
<entry>-5 hours</entry>
</row>
<row>
<entry>-14400</entry>
<entry>Eastern Daylight Time</entry>
<entry>-4 hours</entry>
</row>
<row>
<entry outputclass="colspan_3" namest="c2" nameend="c4"> Number of seconds
in an hour = 3600</entry>
</row>
</tbody>
</tgroup>
</table>
Re: Column headings for subcolumns
Hi,
You already seem to be signalling this correctly using the "rowheader="firstcol"" attribute on the table element. What version of Oxygen are you using and do you want the bold text for the HTML-based or for the PDF output? If you want this for the PDF output, are you using the PDF output based on HTML and CSS or the classic PDF output based on XSL-FO?
Regards,
Radu
You already seem to be signalling this correctly using the "rowheader="firstcol"" attribute on the table element. What version of Oxygen are you using and do you want the bold text for the HTML-based or for the PDF output? If you want this for the PDF output, are you using the PDF output based on HTML and CSS or the classic PDF output based on XSL-FO?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Column headings for subcolumns
Thanks, Radu. I'm using Oxygen XML Author 21.1 and we output using PDF based on HTML and CSS.
One of my fellow writers just suggested using the @scope attribute. I can set the @scope to "col" for cells that need to be treated as headers, but are not in the first row of the table. For example,
<row>
<entry scope='col'>UTC Offset</entry>
<entry scope='col'>Time Zone</entry>
<entry scope='col'>Hours Offset</entry>
</row>
Then apparently the CSS can have an entry like
*[class='topic/entry'][scope='col'] {
font-weight: bold;
}
So I'll use this technique unless you can suggest something different.
One of my fellow writers just suggested using the @scope attribute. I can set the @scope to "col" for cells that need to be treated as headers, but are not in the first row of the table. For example,
<row>
<entry scope='col'>UTC Offset</entry>
<entry scope='col'>Time Zone</entry>
<entry scope='col'>Hours Offset</entry>
</row>
Then apparently the CSS can have an entry like
*[class='topic/entry'][scope='col'] {
font-weight: bold;
}
So I'll use this technique unless you can suggest something different.
Re: Column headings for subcolumns
Hi,
You can alse use the DITA @outputclass attribute for that purpose, it should be converted to a @class attribute value in the intermediary HTML document over which the CSS is applied.
So the CSS selector would be something like:
Regards,
Radu
You can alse use the DITA @outputclass attribute for that purpose, it should be converted to a @class attribute value in the intermediary HTML document over which the CSS is applied.
So the CSS selector would be something like:
Code: Select all
.col {
font-weight: bold;
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service