< Previous | Next >

Lesson 1: Creating a document template

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:

  1. In the Document Studio, click File > New > New Template Wizard and click Next in the welcome window.
  2. Click Create a New Template and click Next.
  3. Select Define Template Title Page and then select these fields to include in the template:
    1. Add Title
    2. Add Subtitle
    3. Add Table of Contents
    4. Add Section Break at the end of the Title Page
    5. Then click Next.
  4. In the Data Sources window, click Add to add the sample Data Source Schema.
    1. In the Data Source type field, select the Rational DOORS type of the schema from the list.
    2. The Data Source file field, changes to the sample included with the installation, which is C:\Program Files\IBM\Rational\Publishing Engine\1.2\source\DOORS\schema\simpleDOORSSchema.xsd.
    3. In the Data Source ID field, type a name for the data source, like DOORS 1.
    4. In the Data Source Description field, type a description for the data source, like DOORS example data source.
    5. Click OK and Next.
  5. In Master Page Structure window, click Add.
    1. In the Name field, enter a name for the Master Page, such as MP Data.
    2. In the Description field, enter a description for the Master Page.
    3. Select a Portrait orientation for the template. This selection is not applied to the output.
    4. Select letter for the template size. This selection is not applied to the output.
    5. Click OK and Next.
  6. In the Variables window, click Add. Create a variable for document titles.
    1. In the Name field, enter a name for the variable, such as DocumentTitle.
    2. In the Description field, enter a description for the variable, such as The title to use for the document.
    3. In the Default Value field, enter a default value, such as DOORS Data.
    4. In the Access field, select External.
    5. Click OK and Next.
  7. In the Summary window, review the information and click Finish.
  8. Save the template.
  9. Save the document specification.

Lesson checkpoint

You have created a template.
< Previous | Next >

Feedback