Document templates

A document template is a blueprint for generating documents. The template defines what data is to be extracted from the data source and how this data is formatted.

Document templates ares self-contained archive files with the extension .dta (Document Template Archive). You can share, move, and copy a template. Document templates created with previous versions of IBM® Rational® Publishing Engine work with the latest version. However, if your data provider does not support the latest version of the Rational Publishing Engine template structure, you can set the template version to use the template structure from previous versions of Rational Publishing Engine.

You can add both static and dynamic content to a document template. The static content includes the text and images provided when the template is designed. The dynamic content is represented by data obtained from the data sources when the document is generated. The template also defines formatting information, though some data might retain the formatting information embedded in it from the data source.

A document template might contain:

Data source schema in templates

When defining the template, you use the definition of your data structure, called a schema, rather than static data. This enables the template to be applied to any data source whose structure matches the structure of the defining data source. A template can contain any number of data source schemas.

When a data source does not exactly match the data source schema, Rational Publishing Engine processes the elements that match the schema and ignores the noncritical errors. For example, if a Rational DOORS® attribute status is used in the template, and the actual data source (a DOORS module) does not have this attribute, the document generation continues by default.

Rational Publishing Engine provides the mechanisms for creating or obtaining schemas for several data source types such as IBM Rational DOORS, IBM Rational Tau, and Rational REST data sources. For more information about the standard schema definition, see http://www.w3.org/XML/Schema. You can use a third-party application to produce a schema from XML data.

Template reuse

You can reuse template structures from templates stored locally, remotely, or in the Central Management component. After you create a new template, you can import entire templates into a master template you are working on when the templates you are importing does not reference other templates. Create snippets for sections of documents that you commonly reuse, such as headers and footers.

When you import templates, you can dynamically reference them or physically embed them. When you dynamically reference a template or an included file, depending on the output type you generate the template into, you are adding a link to that template or file or loading the contents of the imported template when you generate the output. When you physically embed a template or file, you are importing its contents into your master template immediately rather than at run time.

If there are any conflicts between the master template and the template you are referencing or embedding, you are prompted to resolve the conflicts. For example, conflicts might include different data source schemas. When the data source schemas are different, the schema from the imported template can be added to the master template to resolve the conflict.

Default document specifications

Every template is associated with a blank document specification by default. When you preview or publish a template from the Document Studio application, this blank document specification can be customized or used without customization to generate the output. The Document Studio keeps the template in sync with the default document specification when you open or save the template.

Feedback