On 08/27/2019 05:45 PM, Lekan Owodunni wrote:
We are trying out your docx to dita conversion tool and we would like to know how to use the command line to convert a docx file to dita such that the doctype doesn't show in output dita map and topic files. We currently have: w2x -o map <input file path> <output file path> Is there an option that we can specify to ensure that the resulting files do not have a Doctype node/tag.
There is no such option because removing the DOCTYPE from DITA file has unwanted consequences. Without a DTD, a DITA processor like DITA-OT[*] will be not be able to get attribute default values such as: class="- topic/topic ". Such attribute default values are really required. Without them, the DITA processor and its XSL stylesheet simply cannot work.
--> However if you know what you are doing, there is very simple way to achieve that, simply replace W2X_install_dir/xslt/map.xslt by attached map.xslt.
Before doing that you may want to save W2X_install_dir/xslt/map.xslt as W2X_install_dir/xslt/map.xslt.ORI to leran about the differences between attached map.xslt and map.xslt.ORI.
If you purchase the product, I'll explain how to customize map.xslt without having to modify the stock W2X distribution. For now, you'll just have this quick and dirty solution.
---[*] Shameless plug: our own DITA processor, XMLmind DITA Converter (https://www.xmlmind.com/ditac/), supports DITA files without a DOCTYPE but you must specify which W3C XML Schema or which RELAX NG schema to use in each DITA file.
RELAX NG example: --- <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="urn:oasis:names:tc:dita:rng:topic.rng"?> <topic id="MyTopic"> ... </topic> ---See https://www.xmlmind.com/ditac/_distrib/doc/manual/dita_support.html#dita_support
map.xslt
Description: application/xslt
-- XMLmind Word To XML Support List w2x-support@xmlmind.com https://www.xmlmind.com/mailman/listinfo/w2x-support