The DITA Open Toolkit release 1.0.2 or above provides a command line interface as an alternative for users with little knowledge of Ant to use the toolkit easily.
java -jar lib/dost.jar /i:samples/sequence.ditamap /outdir:out /transtype:xhtml
This particular example creates a properties file, and then calls Ant using this properties to build the sample sequence.ditamap file and outputs the xhtml results to the out directory. You can add other parameters to this properties file. See the following Table 1 for details.
Table 1 lists the supported parameters (their Ant names are within the braces) that you can set with this tool.
Parameter | Description |
---|---|
/i:{args.input} | The path and name of the input file. It is in the same upper or lower case with the filename on file system. |
/outdir:{output.dir} | The path of the output directory. |
/tempdir:{dita.temp.dir} | The directory of the temporary file. The default is "temp". |
/ditaext:{dita.extname} | The file extension name to be used in the temp directory. |
/transtype:{transtype} | The transformation type. The supported values include xhtml, pdf, javahelp, eclipsehelp, htmlhelp, eclipsecontent, troff, wordrtf, and docbook. |
/filter:{dita.input.valfile} | The absolute file path and the name of the file that contains the filter/flagging/revision information. |
/draft:{args.draft} | The default "hide draft & cleanup content" processing parameter (" no"= hide them). Only " no" and " yes" are valid values; non-" yes" value is ignored. |
/artlbl:{args.artlbl} | The default "output artwork filenames" processing parameter. Only " no"and " yes"are valid values; non-" yes" value is ignored. The default is " no". |
/ftr:{args.ftr} | The absolute file path and the name of the file that contains XHTML to be placed in the BODY running-footing area. |
/hdr:{args.hdr} | The absolute file path and the name of the file that contains XHTML to be placed in the BODY running-heading area. |
/hdf:{args.hdf} | The absolute file path and the name of the file that contains XHTML to be placed in the HEAD area. |
/csspath:{args.csspath} |
The path for css reference. It can be a URL start
with 'http://' or 'https://'; it also can be a local absolute directory. The
default is output directory.
Note:
The
args.csspath parameter
should end with '/' if it is a URL or file separator for local path.
|
/css:{args.css} |
User specified css file. It can be a local file or
remote file in the web.
Note:
It
is a filepath relative to URL or local root dir based on the type of the
args.csspath parameter.
|
/cssroot:{args.cssroot} |
The root directory of user specified css file. Note:
If
this parameter is set, the ${args.css} should be a filepath relative to args.cssroot.
|
/copycss:{args.copycss} | The parameter to specify whether to copy user specified css files to the directory specified by the args.csspath parameter. Only " no" and " yes" are valid values. The default is " no". |
/indexshow:{args.indexshow} | The parameter to specify whether each index entry needs to display in the body of the text itself. Only " no" and " yes" are valid values. The default is " no". |
/outext:{args.outext} | The output file extension name for generated xhtml files. You can use ".html" or ".htm" as the extension name for the generated xhtml files. You can also specify other extension name. The default is ".html". |
/xsl:{args.xsl} | The xsl file to replace the default xsl file. It replaces dita2docbook.xsl in docbook transformation, dita2fo-shell.xsl in pdf transformation, dita2xhtml.xsl in xhtml/eclipsehelp transformation, dita2rtfImpl.xsl in word transformation, and dita2html.xsl in javahelp/htmlhelp transformation. |
/cleantemp:{clean.temp} | The parameter to specify whether to clean the temporary directory before each build. Only " no" and " yes" are valid values. The default is " yes". |
/foimgext:{args.fo.img.ext} |
The extension name of image file in
pdf transformation. Only ".jpg", ".gif" are valid value. The default is ".jpg".
Note:
Only one extension supported in
the same transformation. The image files with other extensions are renamed
to the specified extension.
|
/javahelptoc:{args.javahelp.toc} | The root file name of the output javahelp toc file in javahelp transformation. The default is the name of input ditamap file. |
/javahelpmap:{args.javahelp.map} | The root file name of the output javahelp map file in javahelp transformation. The default is the name of input ditamap file. |
/eclipsehelptoc:{args.eclipsehelp.toc} | The root file name of the output eclipsehelp toc file in eclipsehelp transformation. The default is the name of the input ditamap file. |
/eclipsecontenttoc:{args.eclipsecontent.toc} | The root file name of the output Eclipse content provider toc file in eclipsecontent transformation. The default is the name of the input ditamap file. |
/xhtmltoc:{args.xhtml.toc} | The root file name of the output xhtml toc file in xhtml transformation. The default is "index". |