Page 1 of 1

How to create a footer in a table (DITA)

Posted: Thu Apr 04, 2024 4:43 pm
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

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

Posted: Thu Apr 04, 2024 4:48 pm
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

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

Posted: Thu Apr 04, 2024 6:43 pm
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.