Template development process

With a template you can bypass the initial setup and design time necessary to create standardized documents. A template defines structure, layout, and content of the document.

Determine the requirements of the document before you start designing your template. You can then prioritize the requirements and determine the amount of information to be extracted.

Split your document into small pieces or blocks of information. Setup empty template with standard master pages and style definitions for each of these blocks. Determine the amount of templates needed given the requirements. You can divide complex or large requirements and documents into several templates. You can describe each block in the template directly and name each block in its Properties > Metadata > name and description attributes. By default, the name and description fields are empty. The name content is displayed in the template, and the description content is displayed in the template element hint field.

The approach to designing templates should be modular. You create templates for small portions of your document and merge them to create one big document. For example, You can have a table of contents template, front cover template, data template, index template and back cover template. These templates can be reused in generating different documents.

Implement the overall structure of the template using a top-down approach. Try and cover approximately 80% of the requirements in the first iterations. Polish the details and incorporate more detailed requirements one by one. Leave less important details or difficult ones to implement later. Consider the relevance of requirements that are difficult to realize (cost- benefit analysis). You could also use scripting in order to extract information in a form that Rational Publishing Engine can efficiently consume. See Using conditions in template elements. Do not get caught up in details regarding formatting.

Testing is done incrementally and interleaved with development. Save often and save with unique names. Verify frequently using a small set of test data. Try each template construct and do not add further elements until what you already have is working.

Once a significant part of the document has been developed, perform load testing to check for performance issues. Use the Preview option instead of Run to limit the size of the data being used. The report will still be accurate but will finish much faster as Rational Publishing Engine retrieves by default maximum of 10 records per query. When testing conditions it is possible that no record from the first 10 matches the condition. In these cases use the full run option or change the default from the Preferences Window. See Setting preferences.

Install the developed and tested templates on the central file server. You can use the template library. Make sure to provide some description on the use of the template. Some sample data and sample document specification for the project data will also help in effectively reusing these templates.

template development process

Building the template

Template can be designed to provide specific page layout (page size and orientation, margins, number of columns, and so on), and styles for the types of paragraphs most likely to be used in the given type of document. A template will contain the following:
  • Document structure elements: paragraph, table, list, and table of contents.
  • Document layout: master pages, style sheets, headers and footers.
  • User defined styles: (internal and external) bold, italic, underline, font size, font color, margins, borders, indentation, and scripting (Javascript).
  • Embedded template content: images, static text, references to static files and style sheets.
  • Data elements: attributes, conditions and dynamic data elements.
  • Variables: External variables that receive values at runtime and internal variables used for calculations.
  • Data extraction: queries and filters.

Feedback