How to create a footer in a table (DITA)

Post here questions and problems related to editing and publishing DITA content.
dledle
Posts: 3
Joined: Thu Apr 04, 2024 4:34 pm

How to create a footer in a table (DITA)

Post by dledle »

Hi everyone,

I am working with a custom dtd (with docbook) and hope to bring everything over to DITA sometime. I am mapping my elements and I am stuck on the CALS table. In docbook, I get
<table>
<title>
<tgroup>
<colspec>
<thead></thead>
<tfoot></tfoot>
<tbody></tbody>
</tgroup>

The <tfoot> tag is not available as valid DITA.

I need a work-around for this issue as there is some content that I need in the <tfoot> element as they relate to the body rows.
I am also a little unfamiliar with Oxygen so detailed responses would be fantastic.

What should I do?

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

Re: How to create a footer in a table (DITA)

Post by Radu »

Hi David,
With DITA XML, a tgroup can only have thead and tbody, so no tfoot element exists in the DITA XML standard:
https://www.oxygenxml.com/dita/1.3/spec ... group.html
When converting I would advise you to take the rows from the tfoot and place them inside the tbody at the end, maybe mark them with an outputclass attribute:

Code: Select all

<row outputclass="footer">
                            <entry/>
                            <entry/>
                        </row>
so that you can identify and style them later in the published output.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dledle
Posts: 3
Joined: Thu Apr 04, 2024 4:34 pm

Re: How to create a footer in a table (DITA)

Post by dledle »

Radu wrote: Thu Apr 04, 2024 4:48 pm Hi David,
With DITA XML, a tgroup can only have thead and tbody, so no tfoot element exists in the DITA XML standard:
https://www.oxygenxml.com/dita/1.3/spec ... group.html
When converting I would advise you to take the rows from the tfoot and place them inside the tbody at the end, maybe mark them with an outputclass attribute:

Code: Select all

<row outputclass="footer">
                            <entry/>
                            <entry/>
                        </row>
so that you can identify and style them later in the published output.
Regards,
Radu
Hi Radu,
Thanks for that tip. I am actually working on a perl script with xml:twig to do these transformations.
Am I limited in using the attribute "outputclass"? Or could I use another attribute? Additionally,
how would I then style this? I think I would transform to PDF using CSS and HTML, as well as Webhelp Responsive.
Last edited by dledle on Thu Apr 04, 2024 6:47 pm, edited 1 time in total.
Post Reply