Skip to main content
Windward

Importing Templates and parent/child styles for version 13

Overview

This article gives you the information to set or change the settings of your Windward Engine, AutoTag config files, and Import Tag properties in order to apply the parent styles or retain child styles of your imported templates or subdocuments. You can set the styles on a tag-by-tag basis, and the Import Tag and Engine settings will apply to all styles for tables, paragraphs, images, charts, etc.

 

This applies to both imported MS Office documents (not containing any Windward Tags and logic) and to your imported Tagged templates (containing Windward Tags and logic).

 

 

Parent and Child Styles in Version 13

Version 13 introduced features that allow you to manage parent and child formatting for imported subdocuments. The setup and capabilities are different than previous versions. In addition, version 14 and newer requires a different setup to manage parent and child properties. For v14 instructions, see this article.

 

There are two modes that can be set for the engine on a global basis: Keep Imported Child Template Styles, and Apply Parent Template Styles.

 

Setting Styles and Formats

Because AutoTag is an addin for MS Office, we use and work with Office’s native features for styles and formatting. See this article for further information.

When you are preparing to import a subdocument, note the MS Office styles that have been applied; these are what will be affected when you Output your final document. 

 

Example:

Your parent template has the Microsoft Word style name “Normal” and is defined as  font Times New Roman and font size 12.

A child template has the Microsoft Word style “Normal,” but is defined as font Courier New and font size 11.

 

Say you choose to apply parent formatting and make all the necessary changes in your Engine, AutoTag config files, and in the template’s Tag Editor. After your template generates the parent report, all styles by the name “Normal” in the parent document will have the font Times New Roman and font size 12. 

 

Example:

 

Where to Update your Windward Products

In order to manage parent and child styles, the following changes must be made:

  • Set import.use.child.styles=____ in the Autotagxxxx.dll.config. When you make these changes, they are applied to ALL Import Tags in all of your templates.
  • Set import.use.child.styles=____ in your Windward Engine (for Java and .NET only). When you make these changes, they are applied to ALL Import Tags in all of your templates.
  • Set use_parent_format=____ for any Import Tag in your templates which needs to be different than the default. This means that on a tag-by-tag basis, you can set the imported subdocument to retain its original formatting, or to match the style of the parent

 

These are the locations where you need to make changes based on your Windward Products:

Your Windward Products

AutoTagXXXX.dll.config

.config File

Tag Editor

AutoTag

Yes

x

Yes

AutoTag + .NET Engine

Yes

Yes: .NET

Yes

AutoTag + Java Engine

Yes

Yes: Java

Yes

AutoTag + RESTful Engine

Yes

x

Yes

 

To change your settings, choose the instructions for either Retaining Child Styles, or Applying Parent Styles below.

 

Retaining Child Styles/Format

AutoTag’s default settings are that they retain the child styles.  If this is the general setting you want for the majority of your templates, there is no need to make any of the changes below. If you have a specific instance where you only need a specific Import Tag to use the parent format, you would need to change the global settings, which will affect all of your templates.

 

If you changed your default settings at some point in the past and you want all of your imported text or objects to keep the formatting from their original documents or locations, make the following changes:

(Again, the settings below are the default settings.)

1.Add a key to the AutoTag config file

Update the AutoTagxxxx.dll.config file adding the following key in the <WindwardReports> section:

<add key="import.use.child.styles" value="true"/>
  • true – this is the default setting and you don’t need the .dll.config file if this is the setting you want. 

 

2.Change Settings in your .NET or Java Engine

  • See the page for .NET and Java engine .config pages for more information
  • For the RESTful engine, there is no .config file to update (just make sure to do steps 1, 3 and 4).

 

In your Windward Engine, set import.use.child.styles=true

The imported child text with a style of the same name (but different settings) will keep its original style setting.

For the formatting settings that are different, and only the styles that are different, they will be set explicitly at the start of the paragraph so that the paragraph will be formatted as it appears in the imported child document. Again, places where the text is explicitly formatted (as in bold, italics, etc.) will not be changed, this only applies to text that has a style set.

 

3.Restart all MS Office Applications

After updating your AutoTag dll.config files, or your Autotag dll.config files plus your Engine config files, make sure to close all MS Office applications, then reopen your template.

Note: Check the task manager to be sure none of the Office applications are still running (windword.exe, excel.exe, etc.)   Force close them manually from task manager if needed.

4.Change the property in the Tag Editor

In any of your Import Tags where there is a concern about child styles, double click on the tag to bring up the Tag Editor. In the Properties pane, under Documents, set use_parent_format=false. This is the default value and will not have any effect on imported child templates.

Applying Parent Styles/Format

If you want all of your imported text or objects to match the format of your parent template, make the following changes:

1.Add a key to the AutoTag config file

Update the AutoTagxxxx.dll.config file adding the following key in the <WindwardReports> section:

<add key="import.use.child.styles" value="false"/>
  • false – it will use the parent documents style as long as the Import Tag has the use-parent-format property set to true.

 

 

2.Change Settings in your .NET or Java Engine

  • See the page for .NET and Java engine .config pages for more information
  • For the RESTful engine, there is no .config file to update (just make sure to do steps 1, 3 and 4).

 

In your Windward Engine, set import.use.child.styles=false.  The style defined in the parent template is now applied to the child content.

Note: If any text in the child content has explicit formatting set, that explicit formatting remains. So if the parent style is bold, the child style is regular, and in the child some of the text is explicitly set to regular, then after being imported, that explicitly set text will remain regular while the rest will become bold.

 

 

3.Restart all MS Office Applications

After updating your AutoTag config files, or your Autotag config files plus your Engine config files, make sure to close all MS Office applications, then reopen.

Note: Check the task manager to be sure none of the Office applications are still running (windword.exe, excel.exe, etc.)   Force close them manually from task manager if needed.

4.Change the property in the Tag Editor

In each of your Import Tags, double click on the tag to bring up the Tag Editor. In the Properties pane, under Documents, set use_parent_format=true.

The imported child templates will have their first paragraph and character formatting set to that of the paragraph in the parent template where the import tag is located. Setting the value of the use_parent_format property of the Import Tag (via the Tag Editor) to true allows Windward to apply the parent template’s defined styles to any defined style that exists in the child documents or templates.

Even if you have enabled the use_parent_format attribute in your template, it will not be processed during output unless the setting import.use.child.styles is set to false in your configuration files. 

 

General Notes:

  • When an imported child template has a style that is not in the parent template list of styles, that style will be added to the parent template's list of styles and that style will carry across and be applied as it is used in the imported child template.
  • For bulleted and numbered lists, all bets are off. This is due to the way they are set in Word through multiple sets of indirection and there is no reliable way to import or match styles.
  • Previous to version 11.1.24 what occurred here was undefined and in practice depended on the report format.

 

Show Me a Working Example 

​For additional information refer to the article Applying Parent Styles to Imported Child Documents.