XML technologies / DITA / Conditional processing / Processing ditaval files
(Excerpt from “DITA – Der neue Standard für Technische Dokumentation” by Johannes Hentrich)
Processing DITA XML files, map files and ditaval files is controlled by an ANT build file in the DITA Open Toolkit. ANT provides details on modifying existing ANT build files or creating new ones.
An ANT build file is an XML file whose two most important elements are <target> and <property>. An element <target> defines the output medium to generate.
Properties or conditions governing output generation are defined in elements <property>. The attribute name specifies the processing parameter of element <property>. Attribute value supplies its value.
To add a ditaval file to the ANT build instructions, use an element <property> whose attribute name has the value dita.input.valfile to specify processing of a ditaval file. Attribute value holds the path to the ditaval file; $basedir specifies the DITA Open Toolkit root directory.
<property name="dita.input.valfile" value="${basedir}${file.separator}ditaval_files{file.separator}filter.ditaval"/>In attribute value, {file.separartor} is a variable for the separator used in a file path through a directory tree. It depends on the operating system: Windows uses the backslash (\), UNIX the forward slash (/).
When the ANT build file with this new entry is invoked through element <poperty>, content is processed according to the instructions in the ditaval file.
Copyright © 2008 XLcontent Verlag
You may print the online version for your private use.
Otherwise, this chapter from “DITA - Der neue Standard für Technische Dokumentation” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
XLcontent Verlag, Pflegerstraße 40, 81247 München
back to top