- In your root directory, create a subdirectory named Sample.
- In the Sample directory, create three subdirectories, and name them ant_scripts, topics, and out.
- In the Sample > topics directory, put your DITA files. Your DITA files must have dita as the file extension.
- In the Sample directory, put your ditamap file. The file extension of your ditamap file must be ditamap. If needed, edit the ditamap file to correct the filepath reference of your dita files (because now they reside one directory lower than your ditamap).
- Download and install the DITA Open Toolkit (DITA-OT1.4.2.1_full_easy_install_bin.zip).
- Download and install the DITA sample garage files (ditaotug131-18042007-garage.zip).
- Go to the DITA sample garage installation directory and thence to the ant_scripts subdirectory. Look for a file called garage_hierarchy_all.xml, and copy it to your Sample > ant_scripts directory. Rename the copied file to build.xml.
- Edit this build.xml file as follows:
- Replace all instances of DITASAMPLE_GARAGE_OUTPUT with out.
- Replace all instances of hierarchy.ditamap with the name of your ditamap file.
- Go to the DITA OT installation directory, look for a file called startcmd.bat, and double-click the file.
- At the DOS command prompt, run the following command: ant -f build.xml dits2xhtml
If your build.xml file is in a different directory than the DITA OT installation directory, specify the full path of the build.xml file. Your DITA files start getting transformed to XHTML and placed in the out directory you specified in the build.xml file. Wait for the command to complete.
- Quit the DOS prompt, return to Windows Explorer, and go to the out directory. The index.html file is the landing page for all your DITA files.
But wait! There's actually an easier option to convert your files to HTML without having to go through the 11 steps I listed. To create your transforms with just one single step, one single command at the DOS prompt, see this excellent article: http://www.ibm.com/developerworks/library/x-tipditajavacmd.html. |
No comments:
Post a Comment