Roniac wrote:
Is it possible to convert multiple docs to DITA simultaneously using
xmlmind word2dita?
I understand that it can convert docx to DITA file by file. But is it
possible to customise your tool, so that I can, perhaps, copy and paste
multiple files into one long docx file? Then go through the conversion
process with a result of multiple ditamaps and their respective topics...
In other words, can 1 docx file be exploded into multiple ditamaps,
perhaps based on the presence of document title paragraph tag or something?
The conversion process being extensively customizable and extensible,
the answer is yes.
The basic idea is to replace the stock XSLT 1.0 stylesheet which
"explodes" a single large DITA topic into a single ditamap by a custom
XSLT 1.0 stylesheet which "explodes" a single large DITA topic into a
multiple ditamaps.
When you pass "-o map" to w2x, in fact, you execute the following steps:
---
-step:com.xmlmind.w2x.processor.ConvertStep:convert
-p convert.create-mathml-object no
-p convert.set-column-number yes
-step:com.xmlmind.w2x.processor.EditStep:edit
-pu edit.xed-url-or-file w2x:xed/main.xed
-step:com.xmlmind.w2x.processor.TransformStep:transform
-pu transform.xslt-url-or-file w2x:xslt/topic.xslt
-p transform.single-topic no
-p transform.out-file %{~pnO}.dita
-step:com.xmlmind.w2x.processor.TransformStep:transform2
-pu transform2.xslt-url-or-file w2x:xslt/map.xslt
-p transform2.output-path %{~po}
-p transform2.topic-type %{transform.topic-type}
-step:com.xmlmind.w2x.processor.DeleteFilesStep:cleanUp
-p cleanUp.files %{~pnO}.dita
---
You need to override this subsequence of steps:
---
-pu transform2.xslt-url-or-file w2x:xslt/map.xslt
-p transform2.output-path %{~po}
-p transform2.topic-type %{transform.topic-type}
---
by your own subsequence of steps:
---
-pu transform2.xslt-url-or-file MULTI_MAPS.xslt
-p transform2.output-path %{~po}
-p transform2.topic-type %{transform.topic-type}
-p transform2.CUSTOM_PARAM1 CUSTOM_VALUE1
-p transform2.CUSTOM_PARAM2 CUSTOM_VALUE2
...
---
Reference:
* Conversion step reference,
http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#step_reference
* Variables substituted in the parameter values passed to the –p and –pu
options,
http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#option_p_variables
--
XMLmind Word To XML Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/w2x-support