Preprocess Specification

Information extricated from DITA-OT Wiki on 6-27-2007.

Initial information was provided by Stephen on the development team, with further descriptions provided by Robert. This is a start at developing a processing specification for the basic toolkit functions. Eventually it should describe what each step does, what the step takes as input, what it generates, and what parameters are available. Plus, any other information that seems necessary.

Step 1 Genlist: generate list files of map and topic

Parse the input file and all of the files which is directly or indirectly referred by it. The result for Step 1 is dita.list stored in temp directory. The contents of the dita.list file are described here.

Step 2: Step 2 is a composite step which implement multiple function.

This step is coded in Java.

1. filtering:

Filter the source files according to the input .ditaval file. Filtering is performed based on the description in the DITA Architectural Specification. In DITA-OT1.3.1 and earlier, filtering is evaluated for the audience, platform, product, and otherprops attributes.. Filtering is performed first, so that further processing time will not be wasted on excluded items. For example, conref should not be evaluated on an element that is filtered out, and title information should not be pulled into a map for topics that are excluded. If the content of a topic is completed filtered out, the empty file won't be generated into temp directory.

2. insert debug information:

Add @xtrf and @xtrc attribute with proper values into each element. The xtrf attribute contains the name of the original file that contained the element; xtrc is an element counter specific to that file. For example, the fifth <p> element in a source file will get the value xtrc="p:5". These allow the process to to provide debug information for a specific element, after filtering and other processes take place.

3.adjust column names of table (merged into conref resolve activity):

Adjust all of the column names of the tables to "col1, col2, col3 ..." to enable conref between tables. This ensures that when conref operates on a table row, entries in that row will use the same column names as the referencing table. Ideally this process would be part of the conref resolution code, but that has not yet been changed.

4.others:

In this step all of the files specified in fullditamapandtopiclist (from the dita.list file) will be parsed. The output is directed to a temp directory.

Step 3 move index entries:

This step is coded in Java.

Move the index entries contained in the <topicmeta> tag in a ditamap into the relevant topics in topicref. In this step all of the files specified in fullditamaplist will be parsed. and all of the relevant dita topic files will be rewritten.

This step will likely be extended in 1.4 to push additional metadata from the map into topics.

Step 4 resolve conref:

This step is coded in XSLT.

Parse all the files which contain conref and resolve the conref by pulling the target content into the element using conref.

In this step, all of the files specified in conreflist will be parsed and rewritten.

Step 5 mappull:

This step is coded in XSLT.

Pull the navtitle and other meta information (such as short description and type) from topics into the ditamap. Also resolve mapref in ditamap. In this step, all of the files specified in fullditamaplist will be parsed and rewritten.

This step will likely be split in the 1.4 release, so that mapref is resolved first, followed by the remaining mappull functions.

Step 6 maplink:

This step is coded in XSLT.

Parse hierarchy structure, relationship table and other relational elements in ditamap. Generate the related links for every topic according to the information collected. The result is stored in maplinks.unordered in temp directory.

In this step, if the user input is a ditamap, it will be parsed.

Step 7 movelink:

This step is coded in Java.

Move the related links in maplinks.unordered to each relevant topic file.

In this step, all of the relevant topic files in maplinks.unordered will be rewritten.

Step 8 topicpull:

This step is coded in XSLT.

Parse all of the topic files which contain cross references or links, and pull in the navigation title and short description for those references.

In this step, all of the files specified in hrefditatopiclist will be parsed.

In the 1.4 release, this step will likely be expanded to pull in generalized content from <foreign> elements.

Step 9 Index generation:

This step is coded in Java.

Parse every topic files and collect information for index terms. The mapping results of index terms and their related topics will be generated into an index file. The index file is relevant to delivery platform such as Java Help, Eclipse Help or Html Help.

In this step, all of the files specified in fullditatopiclist will be parsed.