Page 1 of 1

how to reformat dita from the word2dita result

Posted: Thu Apr 02, 2020 10:54 am
by lisazeng99
Hi Expert,

after using word2diat, we get the dita result in text in blow format, all contents are in a line since title.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="topic_3" xtrc="" xml:lang="en-US"><title xtrc="/Q{.../main}document[1]/Q{.../main}body[1]/Q{.../main}p[250]" ><p>sgfsgrfgregsr</p><table>xfafdfdsafdsafdsafds</table></conbody></concept>


how can we reformat this dita so that it can be shown in normal tag way in text, each line is for a main tag

for exmaple:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="topic_3" xtrc="" xml:lang="en-US">
<title xtrc="/Q{.../main}document[1]/Q{.../main}body[1]/Q{.../main}p[250]" >
<p>sgfsgrfgregsr</p>
<table> xfafdfdsafdsafdsafds</table>
</conbody>
</concept>



thanks~

Re: how to reformat dita from the word2dita result

Posted: Thu Apr 02, 2020 11:15 am
by Radu
Hi Lisa,

Again, sorry but we are not very familiar with how the DITA For Publishers plugins convert Word to DITA, maybe you can ask on the DITA Users List (groups.io) for help.

Regards,
Radu

Re: how to reformat dita from the word2dita result

Posted: Sun Apr 05, 2020 2:17 pm
by chrispitude
Hi Lisa,

I am currently converting a set of four application notes from Word to DITA. They vary from 50 pages to 300 pages in length.

I saved the app notes from Word as "Web Page, Filtered" which is a simplified HTML output. I was then able to write a perl script to read each HTML file and process it into a single large DITA topic file.

The drawback of this method is that you have to write your own conversion code. I am working with a perl library called XML::Twig which makes it easy to manipulate tag structure:

https://www.xmltwig.org/xmltwig/twig_dev.html

If you have a perl expert on your team and this sounds interesting, I can share more details.