Sample files

This section contains information about the DITA sample source files that come with DITA Open Toolkit.

The following sample files (garage and grocery shopping) are included in their DITA source form for your reference. Ant scripts are also included. Both samples are in the samples directory.

Garage sample

The garage sample, which is located in the ditaot/doc/ot-usergide/MY_DITA_SOURCE/samples directory of the Toolkit source distribution, is a set of DITA source files containing concepts and tasks related to organizing and doing tasks in a garage. The sample map files allow the topics to be published as either a hierarchy or a sequence. The sample also includes Ant scripts to allow you to publish to all supported target environments.

Before you begin to use the sample files (which include both the garage sample and the grocery shopping sample), we recommend creating two directories in your root directory called MY_DITA_SOURCE and MY_DITA_OUTPUT (Windows examples would be C:/MY_DITA_SOURCE and C:/MY_DITA_OUTPUT) and then copying both the garage and grocery shopping sample files from the ditaot/samples directory to MY_DITA_SOURCE. Your directory structure should then look like this:

The garage sample includes Ant scripts that process to all supported target environments. A filtering (conditional processing) script is also included: garage_filtering_xhtml.xml. This script filters out (excludes) all files having to do with oil or snow, which are tagged with the "otherprops" attribute. Running this script produces a hierarchically organized output file with four of the topics excluded.

Grocery shopping sample

The grocery shopping sample, which is located in the ditaot/doc/ot-userguide/MY_DITA_SOURCE/samples directory of the Toolkit source distribution, is a simple DITA project that includes seven topics: an overview topic, two concepts, two tasks, and two reference topics. The project also includes a map that aggregates the files and links them meaningfully using a relationship table. Ant scripts that process to the XHTML, HTML Help, and PDF2 targets are also provided.

Before you begin to use the sample files (which include both the garage sample and the grocery shopping sample), we recommend creating two directories in your root directory called MY_DITA_SOURCE and MY_DITA_OUTPUT (Windows examples would be C:/MY_DITA_SOURCE and C:/MY_DITA_OUTPUT) and then copying both the garage and grocery shopping sample files from the ditaot/samples directory to MY_DITA_SOURCE. Your directory structure should then look like this:

The grocery shopping sample assumes you are already familiar with the garage sample provided as both a project model as well as a tool to verify your DITA Open Toolkit installation, and that you have processed the garage sample as described in Processing (building) and publishing DITA documents.