If the .dmg
distribution has been used to install XMLmind Word To XML on the Mac, the w2x
command-line utility is found in WordToXML.app/Contents/Resources/w2x/bin/
.
Usage: w2x [-version] [-v|-vv] [Options] [-liststeps] in_docx_file out_file
Options are:
docbook
, docbook5
, assembly
(DocBook V5.1 assembly), topic
, map
, bookmap
, xhtml_css
(single-page styled HTML, that is, single-page XHTML+CSS), xhtml_strict
, xhtml_loose
, xhtml1_1
, xhtml5
, frameset
(multi-page styled HTML), frameset_strict
(multi-page XHTML 1.0 Strict), frameset_loose
(multi-page XHTML 1.0 Transitional), frameset1_1
(multi-page XHTML 1.1), frameset5
(multi-page XHTML 5.0), webhelp
(Web Help containing styled HTML), webhelp_strict
(Web Help containing XHTML 1.0 Strict), webhelp_loose
(Web Help containing XHTML 1.0 Transitional), webhelp1_1
(Web Help containing XHTML 1.1), webhelp5
(Web Help containing XHTML 5.0), epub
(EPUB 2 containing styled XHTML 1.1), epub1_1
(EPUB 2 containing semantic XHTML 1.1).xhtml_css
(single-page styled HTML, that is, single-page XHTML+CSS).step_name
.param_name
to parametrize the step called step_name.–p
and –pu
options relatively to options specifying conversions steps (-c
, -e
, -t
, -step
, etc) is not significant. For example: “-p convert.charset UTF-8 -c
” is equivalent to “-c -p convert.charset UTF-8
”.-p
, except that parameter value URL_or_file is first converted to an URL.-f
options file if any, to current working directory otherwise) or the filename of an existing file or directory.transform.out-file
.transform2.out-file
.save.out-file
.com.xmlmind.w2x.processor.ProcessStep
.$ w2x -o bookmap -liststeps -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 -p edit.xed-url-or-file file:/opt/w2x/xed/main.xed -step:com.xmlmind.w2x.processor.TransformStep:transform -p transform.out-file %{~pnO}.dita -p transform.single-topic no -p transform.xslt-url-or-file file:/opt/w2x/xslt/topic.xslt -step:com.xmlmind.w2x.processor.TransformStep:transform2 -p transform2.xslt-url-or-file file:/opt/w2x/xslt/bookmap.xslt -p transform2.topic-type %{transform.topic-type} -p transform2.output-path %{~po} -step:com.xmlmind.w2x.processor.DeleteFilesStep:cleanUp -p cleanUp.files %{~pnO}.dita
The -liststeps
is also useful when developing a plugin. It may be used to learn how a stock conversion (e.g. bookmap
) is implemented to get some inspiration when developing your own plugin.