Document Developer - instructions > Making the document dynamic > Specifying output format

Specifying output format
You can define how dynamic data is formatted for a specific substitution.
Note:
 
*
To dynamically select, for example, the language code on a substitution, you can set a variable as a modification on the Character style Language property. For example, if you want the date format to be based on the language preferences of the document recipient.
To specify output format
1
2
Note:
3
Click the value field for the Format property. A drop-down list is displayed.
4
To specify a non-default language code setting for a substitution
1
2
Note:
3
Click the value field for the Format property. A drop-down list is displayed.
4
In the drop-down list, click the browse button to the right of Advanced. The Advanced Text Format dialog opens.
5
In the Category list, select the category of the output format.
6
In the Type list, select the type of the output format.
7
In the Locale list, select the language (and country) code.
8
To specify a custom output format string
1
2
3
Note:
4
Click the value field for the Format property. A drop-down list is displayed.
5
In the drop-down list, click the browse button to the right of Advanced. The Advanced Text Format dialog opens.
6
In the Category list, select the category of the output format.
7
In the Type list, select the type of the output format that is must suitable.
8
In the Locale list, select the language (and country) code.
9
For syntax, see Picture clauses.
Example 47
{time(fr-FR){HH:MM:SS}{, }date(fr-FR){EEEE'le' D MMMM YYYY}}
This format string would give with input data 2008-03-05T10:30:00Z the following output:
10:30:00, mercredi le 5 Mars 2008
 
To add a custom format type
1
Browse to <StreamServe installation>
\Services\StoryTeller\<version>\bin
2
Open textformats.xml in a text editor. This file is preferably owned by IT personnel and distributed for a uniform look.
3
To add a format category, add a new <TextFormatCategory> in the <Categories> group. (Preferably copy, paste and edit an existing category).
4
To add a format type, add a new <TextFormat .../> line. Optionally, specify if the format type should be available in the drop-down short list.
Example 48
<TextFormat Name="My_datetimeformat" Pattern="{time(sv-SE){HH:MM:SS}date(sv-SE){YYYY-MM-DD}}" />
 
Example 49
<TextFormat Name="My_numbertype" Pattern="num{sz,zz9.99}" ShortList="true" />
 
 
*
date(de-DE){EEEE DD MMMM YYYY}
1
Hold down the Alt key and type 0160 using the numeric keypad.
If you edit the textformats.xml file for easier re-use of the format, enter &nbsp instead of the space character.
OpenText StreamServe 5.6 Updated: 2013-03-01