how to reformat dita from the word2dita result

lisazeng99
Posts: 14
Joined: Thu Sep 14, 2017 10:24 am

how to reformat dita from the word2dita result

Post by lisazeng99 » Thu Apr 02, 2020 10:54 am

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~

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

Re: how to reformat dita from the word2dita result

Post by Radu » Thu Apr 02, 2020 11:15 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

chrispitude
Posts: 224
Joined: Thu May 02, 2019 2:32 pm

Re: how to reformat dita from the word2dita result

Post by chrispitude » Sun Apr 05, 2020 2:17 pm

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.

Post Reply