Rational® DOORS® sample
data is provided in the Rational Publishing Engine installation,
which you can use to generate a Rational DOORS template
and report.
Basic overview
Create a document template,
add the data source, add template elements, such as queries, master
pages and styles, to the template, and then generate the document.
You
can find the Rational DOORS sample
data source schema used in this topic in %RPE_HOME%\source\DOORS\examples\doors-multimodule\RPE_DOORSDataList.xsd.
You
can find the finished template that this topic helps you to create
in %RPE_HOME%\source\DOORS\examples\Tutorial_DOORS.dta.
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:
- In the Document Studio, click and click Next in the welcome
window.
- Click Create a New Template and 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.
- In the Data Source file field, select the
sample included with the installation, which is located in C:\Program
Files\IBM\Rational\Publishing Engine\1.1.2.2\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.
- In the Orientation field, select an orientation for the template.
This selection is not applied to the output.
- In the Size field, 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.
2. Adding template elements and conditions
You
can add a range of template elements, queries, and conditions to build
a template.
- In the Document Studio, drag the Container element
from the Palette view to the Template Content
editor.
- From the Data Source Schemas view, expand Module (DOORSModule) and
drag the Object (DOORSObject) into the Container
element. The query displays in the element as Data_Source_ID
Module/Object.
- From the Data Source Schemas view, expand Object (DOORSObject) and
drag the Object Heading (string) attribute
into the Container element. A text element is created automatically
within the Container element.
- If the Object Heading contains a value, assign a condition to
the display of the text element:
- Right-click on the Object Heading element and click . The Set Condition for Current Element window
opens.
- In the Script Expression section, expand Attributes and
select the check box for the Object_Heading attribute.
- For the Left operand field, select the _element_level condition.
- For the Operator field, select Not
equal to.
- Click Add to create the condition script.
- Click OK to save the condition
- From the Palette view, drag a Paragraph element into the Template
Content editor and place it under the Text element, also inside the
Container element.
- From the Data Source Schemas view, expand Object (DOORSObject) and
drag the Object Text (string) attribute into
the Paragraph element. A text element is created within the Paragraph
element.
- If the Object Text contains a value, assign a condition to the
display of the text element:
- Right-click the Object Text element and click . The Set Condition for Current Element window
opens.
- In the Script Expression section, expand Attributes and
select the check box for the Object_Text attribute.
- For the Left operand field, select the _element_level condition.
- For the Operator field, select Not
equal to.
- Click Add to create the condition script.
- Click OK to save the condition
- From the Palette view, drag the Table
of contents element to the Template Content editor and
place it above the Container element.
- Add an image to the template:
- From the Palette view, drag an Image element
to the Template Content editor.
- In the Template Content editor, right-click the Image element
and click .
- Select the image to add and click OK. The
image is added to the template.
- Add a document title placeholder:
- From the Palette view, drag the Paragraph element
to the Template Content editor.
- Select the Paragraph element.
- In the Properties view, expand the Metadata section.
- In the name field, enter a name such as Document Title
Placeholder.
- From the Palette view, drag the Text element
to the Template Content editor and place it in the Paragraph element.
- Add the DocumentTitle variable to the placeholder:
- In the Outline view, expand Variables.
- Drag the DocumentTitle variable to the
Text element in the Document Title Placeholder paragraph.

- Save the template.
- Define a style in the template:
- In Document Studio, click . The New Style wizard
opens. In the welcome window, click Next.
- In the Style name field, type the style
name as RPE_Title and click Next.
- In the Select Style Properties window, select
the property or group of properties to apply to the template element.
For example, select text and click
to
add the fields to your style, and then click Next.
- In the Set Property Value window, expand
the text and font property
names. Enter values in the Property Value column
for each property:
- For bold, enter true.
- For font color, enter hexadecimal number, such as 0000EE for
blue.
- For font size, enter a point size, such as 16.
Then click Next.
- Review the summary and click Finish.
- Assign the created style to the Document Title Placeholder paragraph
by dragging the style from the Outline view to
the Paragraph element.
- Add a master page to the template:
- In the bottom of the template editor, click the Master
Page tab.
- In the Palette view, select the Paragraph element
and drag it into the Header element in the template editor.
- In the Palette view, select the Text element
and drag it into the Paragraph element you added to the Header.
- In the Outline view, right-click Variables and click .
- Enter the details for a HeaderData variable.
- Name: HeaderData
- Description: Header information
- Default Value:
- Access: External
- Drag the HeaderData variable from the Outline view into the Text
element in the Template Content editor.
- From the Palette view, select the Page Number
element and drag it into the Footer element in the Template Content
editor.
- Click the Template Content tab.
- From the Outline view, drag the Master
Page: MP Data into the Template Content editor and place
it in the Container element.
- Save the template.
- Adding Rational DOORS links in the template:
- In the Palette view, drag the Container element
into the Template Content editor. Place it into the existing Container
element under the Paragraph element.
- From the Data Source Schemas view, expand Object (DOORSObject) and
drag the Link (DOORSInnerLink) attribute into
the Container element.
- In the Select Context window, select the first item and click OK.
- Select the Container element and in the Properties view, expand Metadata.
In the name field, enter Link Container.
- In the Properties view, expand Data,
select Filter and then click the
Configuration icon.
- In the Native Filter tab of the Filter Editor window,
edit the filter for the Module/Object/Link query
by entering Link direction in, and then click OK.
- From the Palette view, drag the Paragraph element into the Link
Container element.
- From the Data Source Schemas view, expand .
- Drag the Linked Object (DOORSLinkObject) attribute
into the Paragraph element. A Text element is created automatically
in the Paragraph element.
- Click OK.
- Select the Paragraph element and in the Properties view, expand Metadata.
In the name field, enter Linked
Objects Para.
- From the Data Source Schemas view, expand Object (DOORSObject) and Linked
Object (DOORSLinkObject), and then drag the Object
Text (string) query into the Paragraph element.
- Save your template.
- Compare your template to the one included in your installation
files: %RPE_HOME%\source\DOORS\examples\Tutorial_DOORS.dta.
3. Generating the document output
Switch
to the Launcher perspective. If the perspective icon is not visible
under the toolbar, click the button located in the upper left part
of the screen, below the toolbar.
Note: When the keep
document specification synchronized preference is selected,
the document specification is synchronized with at every load, close,
and save operation. If the preference is not selected, you must manually
synchronize the document specification.
To configure the
data source:
- In the Document Specification window, expand .
- Right-click the data sourceand select Configure Data
Source. In the Rational DOORS Database Source Selection
wizard, click Next.
- Specify the connection details:
- To use a running instance of Rational DOORS, select Use running
DOORS instance and click Next.
- To run Rational DOORS in the background, select Run
a new background DOORS process and specify the user name,
password, database, and path to doors.exe; and
then click Next.
- In the Select a view from the Rational DOORS database window, navigate
to the structure and select the appropriate module, version, and view.
After you select a view, Finish enables.
- Click Finish.
- After you configure the data source, generate the document by
clicking or by clicking the Generate Document
icon
in the toolbar.