Skip to main content
Windward

Tag Reference

autotag-wiki-logo.pngOverview

This page provides an overview of Windward Tags. See the Tag Reference Section for more complete information regarding each tag.

Generic Form of Tags

Some tags require a start tag, such as <wr:forEach ... >, and an end tag, such as </wr:forEach>so the report generator knows where to start and where to stop executing the command. These are referred to as body tags, as they contain a body of information to act on between their start and end tags.

The general form of a body tag is:

<wr:tag attribute1="value" attribute2="value"> ... </wr:tag>

 

The general form of a self-contained tag (a tag that doesn't require both start and end tags) is:

<wr:tag attribute1="value" attribute2="value"/>

To use quotes ("), apostrophes ('), ampersands (&), less than (<) or greater than (>) brackets within tags, refer to the Tag Reference section.

 

The select= Attribute

The select attribute can be processed in one of three different ways. Windward will determine which mode to use based on the text in the select (for example, if it's an SQL data source, then starting with "select " is a select). You can force the mode by setting the first character of the select as listed in each mode:

  • !select - The string will be passed to the data source provider.
  • =select - The string will be evaluated by Windward's macro evaluator. In versions 9 & earlier this was test= or evaluate=.
  • 'select - The string is a literal string that will be displayed as is after any ${vars} have been substituted. In versions 9 & earlier this was value=.

Tag Attributes and Their Values

Tags have different attributes that can be set a variety of ways. For example, the text "Windward Reports" could be described as style = bold, where style is the name of the attribute, and bold is the value of this attribute. The style attribute could also take the value italic.

Setting attributes to different values customizes how a tag behaves. For example, an attribute tells a Windward Reports tag what data item to extract from your data source. Or, you can set an attribute to control how to loop through a data table, e.g. stopping at each row, or stepping through by two to skip every other row.

Some attributes are required and must be set, while other attributes are optional. Some attributes have default values and only need to be set if you require a value other than the default setting. The specific format (syntax) of each tag is described in the Tag Reference pages listed on this page in the Shortcuts to Windward Tags section.  The syntax describes the attributes for each tag, if the attribute is required or optional, the range of values each attribute may be set to, and what the default values are.

Selecting Data to Reference

The key attribute of most tags is what data to select for the tag to act on. By selecting data items in your data source, you can indicate where to begin looping to extract data, the specific data to extract, or the data to use to perform an arithmetic function.

The syntax you use to reference data within your tags depends on the type of data source you use. For details, refer to the Referencing Data chapter.

The method and format you use to reference data in your tags depend on the type of data you use as your data source. For an introduction to XML and SQL data structures and how they are referenced, refer to the Data Source chapter.

For additional information on using a SQL database, see the SQL cheat sheet (by one of the best SQL authors out there, Joe Celko).

These are the tags available for use in your templates. To view specific examples, refer to the template samples provided by Windward Reports.

Each tag's description contains examples for using both XML and SQL data sources. An SQL data table is similar to an XML node that contains data items, or child nodes. An SQL data field is similar to an XML data item. For details of the structure of these types of data sources, refer to the Referencing Data chapter.

Shortcuts to Windward Tags

The function tag was deprecated in version 9 and removed in version 12.5.

Using the Tags

Reports are designed with two basic constructs. The first is the capabilities of Word itself to format and write text, paragraphs, tables, etc.

The second part is the Windward Reports tags

All tags are well-formed XML tags, meeting the rules outlined in the XML 1.0 specification. This means they take the form of either:

<wr:tag attr1=”value” attr2=”value”/> or

<wr:tag attr1=”value” attr2=”value”> … </wr:tag>

 

Each tag is defined to be one of the above two forms:

· An empty tag, where the tag and its attributes are self-contained

· A body tag, where the tag requires a start tag, a body of text to act on, and an end tag indicating where the tag's action ends.

The attr1="value" is a series of attributes and their values. The values must be surrounded with either single or double quotes. If you use single quotes, then the value can have double quotes in it and vice versa. You cannot place a > in the value because this symbol ends the tag. You also cannot have both single and double quotes in a value. To handle these restrictions, you can place the following text that will be replaced with the necessary character:

Use

To get

"

&apos;

<

<

>

>

&

&

So to have test=”${item.index} > 4}” you would instead put test=”${item.index} > 4}”. (The < is never needed, it is included for symmetry with >.)

Each tag has specific attributes. Some are required and the report generator throws an exception if they are missing. Other attributes are optional. If the wrong attribute is included in a tag, an exception occurs.

  • Was this article helpful?