Word to DITA Conversion Batch Converter Add-On Table Titles

Post here questions and problems related to editing and publishing DITA content.
Aidan400
Posts: 7
Joined: Tue May 24, 2022 11:36 pm

Word to DITA Conversion Batch Converter Add-On Table Titles

Post by Aidan400 »

Hello!
I need to convert Word files to DITA XML for work. Some of these files contain tables with table titles above them like so:
image.png
image.png (10.84 KiB) Viewed 456 times
Currently, this gives an output similar to the following:
image.png
image.png (95.21 KiB) Viewed 456 times
But I would like it to look something like this:
image.png
image.png (95.89 KiB) Viewed 456 times
Would it be possible to, using the Batch Converter Add-On, map these table titles to a <title> element wrapped in the <table> element for the table itself?

The title is currently sitting in the paragraph above. However, originally, the titles were in the first row of the table, and a Word macro is used to remove them. So, alternatively, could the title be mapped to a <title> element somehow from the first row of the table? If not, since this macro currently removes them automatically, the titles could be pasted in Word with a specific Word style, and then I believe I am able to map that style to the <title> element - this has raised a problem for me as I can not determine how to wrap the <title> element inside the <table> element for the table below it.
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Word to DITA Conversion Batch Converter Add-On Table Titles

Post by Radu »

Hi,

If you send us (support@oxygenxml.com) a small Word document containing such a construct we could maybe try to look into what information we receive from inside the Word document at conversion time and how we could map that title inside the generated DITA table in a future batch converter version.
But in such cases when you obtain DITA content which needs to be further modified you could use our XML refactoring actions based on XSLT or XQuery:
https://www.oxygenxml.com/doc/versions/ ... tools.html

There is a GitHub project with various XML refactoring actions:
https://github.com/oxygenxml/dita-refactoring-examples

and I just added an XML refactoring action for what you want here:
https://github.com/oxygenxml/dita-refac ... de%20table

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply