Pre-processing modules
The pre-processing operation is a set of steps that typically runs at the beginning of every DITA-OT transformation. Each step or stage corresponds to an Ant target in the build pipeline; the preprocess target calls the entire set of steps.
- Generate lists (gen-list) The gen-list step examines the input files and creates lists of topics, images, document properties, or other content. These lists are used by later steps in the pipeline. For example, one list includes all topics that make use of the conref attribute; only those files are processed during the conref stage of the build. This step is implemented in Java.
- Debug and filter (debug-filter)
The debug-filter step processes all referenced DITA content and creates copies in a temporary directory. As the DITA content is copied, filtering is performed, debugging information is inserted, and table column names are adjusted. This step is implemented in Java. - Copy related files (copy-files)
The copy-files step copies non-DITA resources to the output directory, such as HTML files that are referenced in a map or images that are referenced by a DITAVAL file. - Resolve keyref (keyref)
The keyref step examines all the keys that are defined in the DITA source and resolved the key references. Links that make use of keys are updated so that any @href value is replaced by the appropriate target; key-based text replacement is also performed. This step is implemented in Java. - Conref push (conrefpush)
The conrefpush step resolves "conref push" references. This step only processes documents that use conref push or that are updated due to the push action. This step is implemented in Java. - Conref (conref)
The conref step resolves conref attributes, processing only the DITA maps or topics that use the @conref attribute. This step is implemented in XSLT. - Move metadata (move-meta-entries)
The move-meta-entries step pushes metadata back and forth between maps and topics. For example, index entries and copyrights in the map are pushed into affected topics, so that the topics can be processed later in isolation while retaining all relevant metadata. This step is implemented in Java. - Resolve code references (codref)
The coderef step resolves references made with the <coderef> element. This step is implemented in Java. - Resolve map references (mapref)
The mapref step resolves references from one DITA map to another. This step is implemented in XSLT. - Pull content into maps (mappull)
The mappull step pulls content from referenced topics into maps, and then cascades data within maps. This step is implemented in XSLT. - Chunk topics (chunk)
The chunk step breaks apart and assembles referenced DITA content based on the @chunk attribute in maps. This step is implemented in Java. - Map based linking (maplink and move-links)
These two steps work together to create links based on a map and move those links into the referenced topics. The links are created based on hierarchy in the DITA map, the @collection-type attribute, and relationship tables. This step is implemented in XSLT and Java. - Pull content into topics (topicpull)
The topicpull step pulls content into <xref> and <link> elements. This step is implemented in XSLT. - Flagging in the toolkit
Beginning with DITA-OT 1.7, flagging support is implemented as a common preprocess module. The module evaluates the DITAVAL against all flagging attributes, and adds DITA-OT specific hints in to the topic when flags are active. Any extended transform type may use these hints to support flagging without adding logic to interpret the DITAVAL.
Parent topic: Architecture of the DITA Open Toolkit