Semantics and Structure

Document Factory templates are bound to a baseline in a Caliber project. This is the base of other concepts in Document Factory templates. The way to specify a project and a baseline is as follows,

… 
$PROJECT{My Project}
…
$BASELINE{My Baseline} 
…

Templates consist of a document and sections. The document is the part of a template from which users can access baseline specific settings and properties. Whereas, sections are for each enumerating loop that passes through each requirement in the baseline.

The area outside any section is called document area.

…
$BEGIN_SECTION
…

This area is called section area.

…
$END_SECTION 
…

There can be multiple sections, but there is only one document area in a template. In the document area, users can access baseline properties. Baseline and project specifications are contained in the document area.

…
$PROJECT{My Order Processing System}
…
$BASELINE{As of week 25 2008}

The section is the area in between $BEGIN_SECTION and $END_SECTION. In the resulting document, this area will be duplicated repeatedly for each requirement. Therefore, if users have specified sections, the resulting document will print the section as many times as the number of requirements in the baseline. Each repeated section represents a requirement.

If users specify the following:

$BEGIN_SECTION
… 
This time, the current requirement name is <<name>>
$END_SECTION

Document Factory keyword <<name>> is replaced by the name of the respective requirement each time, resulting in the list of all requirements names in the baseline. For each requirement, the document will copy the section area, substituting the keywords in the area with the information pertaining to that requirement. The section repeats for each requirement in the baseline and the section must be spatially accurate to include spaces, pictures, tables, and OLE objects.

Section area is also used to provide settings about the enumeration (loop). For example, use $FILTER to specify which requirements in the baseline to include in the document and use $SORT to specify in which order the requirements should be printed.

$BEGIN_SECTION 
$FILTER{Filter: JustCreatedFilter} 
$SORT{hierarchy} 
This time, the current requirement name is <<name>>
$END_SECTION
 

Document Factory copies and substitutes with requirement data.

Use commands only in their respective areas. For example, the $PROJECT command used above can appear in the document area only and the $SORT command can appear in the section area only.

The template is structured so that the commands can be nested within other commands where they reside within their proper areas:

$BEGIN_SECTION
… 
$BEGIN_HISTORY … 
$BEGIN_CHANGES … 
$END_CHANGES … 
$END_HISTORY … 
… 
$END_SECTION

The section area can appear only within document, the history area can appear only within section, and the changes area can appear only within history.

Identifiers or input parameters are contained within the command to specify what you would like to extract for the report. For example, traces can be refined to the kind of traces to include in the report instead of all traces associated with the requirement as shown below:

$BEGIN_TRACES(TO_TRACES,DIRECT_TRACES,ALL_OBJECTS) … 
$END_TRACES