Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Converting Document Factory (DF1) Templates to DocFactory2 Templates

Converting Document Factory (DF1) Templates to DocFactory2 Templates

Introduction

DocFactory 2 (DF2) differs completely from Document factory (DF1). It utilises Word XML to generate documents. Due to this fact the DF2 syntax is similar to DF1 but stricter.

This document provides rules and guidelines to help with the conversion of Document Factory templates to DocFactory2 templates and the creation of DocFactory2 templates.

GENERAL RULES

  1. UDA names have to exist if referred to by an inline filter.
  2. UDA names have to be exactly as they have been created in Caliber including capitalisation.
  3. UDA names cannot have an “AND” and /or an “OR” in the name. All of these UDAs require to be renamed in Caliber
  4. All DF2 commands have to be followed by a hard return except for the $END_... DF2 commands in table cells
  5. All DF2 commands cannot have additional spaces before or after the command
  6. $BEGIN_SECTION…$END_SECTION cannot be used in tables, only $BEGIN_ROW…$END_ROW
  7. The keyword <<baseline>> has to be in lower case
  8. The command $BEGIN_SIGN_ROW … $END_SIGN_ROW cannot be formatted
  9. Table of contents formatting , the style of the headings requires to be based on the standard Headings and cannot be renamed.

The UDA names have to exist if referred to by an inline filter

This can cause issues with the document generation as DF2 obtains a list of UDA first before parsing the inline filter.

The UDA names have to be exactly as they have been created in Caliber including capitalisation

DF2 differs from Document Factory, all UDA names referred to in an inline filter require to be exactly as they are created in Caliber including capilitisation e.g. SubType , Subtype

UDA names containing an “AND” and /or an “OR” in the name

This causes issues with in line filters in DocFactory2. For 11.5.1 and above this issue has been resolved by escaping the UDA name.

e.g. "$FILTER{Program or Team Name = 'Test'}" should be "$FILTER{Program \or Team Name = 'Test'}"

For previous versions this can only be resolved by renaming the UDA, typically the following error will be thrown 

 

All DF2 commands have to be followed by a hard return except for the $END_ … in table cells

This causes DF2 commands to be output in the resulting document

Example: The syntax below

will result in this $END_SECTION appearing in the document e.g.

 

This is resolved with hard returns

All DF2 commands cannot have additional spaces before or after syntax

This can also result in DF2 tags appearing in documents

$BEGIN_SECTION…$END_SECTION cannot be used in tables, only $BEGIN_ROW…$END_ROW

The following syntax will result in no table being output.

 

 The $BEGIN_ROW … $END_ROW syntax requires to be used. Note the first row of the table has no borders

 

The keyword <<baseline>> has to be in lower case

This is dependent on the DF2 template itself, making the keyword lower case will prevent the keyword appearing in the generated document

The command $BEGIN_SIGN_ROW … $END_SIGN_ROW cannot be formatted

If the DF2 command has a style applied to it, the $END_SIGN_ROW will appear in the generated document

Table of contents formatting , the style of the headings requires to be based on the standard Headings and cannot be renamed.

For the table of contents to work correctly the style applied to the DF2 keywords requires to be a Heading style. This style be modified in size and font etc. but cannot be renamed.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2017-07-26 21:36
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.