A document template defines what data is to be extracted
from the data source and how to format the presentation of that data.
A template is built of static and dynamic content. The static content
is defined by the data such as texts and images, which are provided
when the template is designed. Dynamic content is represented by placeholders,
usually in the form of queries, and is obtained from the data sources
at document generation time. A document template does not refer to
concrete data sources.
Templates
operate with data source schemas not with actual data sources. You
can add new data source schema to the currently open template.
The
data structure is defined with a schema. A schema allows for the template
to be applied to any data source that has a matching structure.
To create a template:
- In the Document Studio, click and click Next in the welcome
window.
- Click Create a New Template.
- Optional: Enter the metadata for the template:
- Name: A metadata name for the template.
This name is only in the metadata and not a name for the file to be
saved as.
- Description: An explanation of the
content in the template or context for other users to work with the
template.
Click Next.
- Select Define Template Title Page and
then select these fields to include in the template:
- Add Title
- Add Subtitle
- Add Table of Contents
- Add Section Break at the end of the Title
Page
- Then click Next.
- In the Data Sources window, click Add to
add the sample Data Source Schema.
- In the Data Source type field,
select the Rational® DOORS® type of the schema from
the list.
- The Data Source file field, changes
to the sample included with the installation, which is %RPE_HOME%\source\DOORS\schema\simpleDOORSSchema.xsd.
- In the Data Source ID field,
type a name for the data source, like DOORS 1.
- In the Data Source Description field,
type a description for the data source, like DOORS example
data source.
- Click OK and Next.
- In Master Page Structure window, click Add.
- In the Name field, enter a name for the Master Page,
such as MP Data.
- In the Description field, enter a description for the
Master Page.
- Select a Portrait orientation for the template. This
selection is not applied to the output.
- Select letter for the template size. This selection
is not applied to the output.
- Click OK and Next.
- In the Variables window, click Add.
Create a variable for document titles.
- In the Name field, enter a name for the variable, such
as DocumentTitle.
- In the Description field, enter a description for the
variable, such as The title to use for the document.
- In the Default Value field, enter a default value, such
as DOORS Data.
- In the Access field, select External.
- Click OK and Next.
- In the Summary window, review the
information and click Finish.
- Save the template.
- Save the document specification.