Page 1 of 1

Styling definition lists like a table

Posted: Wed Mar 13, 2024 1:37 pm
by Tomh94
Hello,

As the title states, I would like to style <dl>'s like a table. I have found an old post (dita-editing-and-publishing-dita-conten ... 13630.html) with a solution, but that no longer seems to work.

I am unable to target the <dlentry> elements. And copy-pasting the snippet from the old post causes a failed transformation.

Engine name: DITA-OT
Severity: error
Description: [CH] Unexpected display value 'table-cell' for element 'dt'. The parent 'dl' should have display 'table-row'. The parent structure: <dl xmlns:chfox="http://www.oxygenxml.com/chemistry/extensions/fop"
URL: https://www.oxygenxml.com/DITA-messages.html#msgs__CH

The error states that the parent of the <dt> element is a <dl>, when it is in fact a <dlentry> right? So I am confused.

Any ideas?

Thanks in advance for your time!

Re: Styling definition lists like a table

Posted: Wed Mar 13, 2024 1:49 pm
by julien_lacour
Hello,

You can follow the How to Convert Definition Lists into Tables topic from our user guide to realize this customization, it explains step by step how to create the publishing template and the XSLT stylesheet that transforms <dl> into tables.

Regards,
Julien