Presentation settings control the output of the text. For example, you can specify that the text should include a currency symbol or that it should round all numbers up. There is no limit to the number of presentation settings that you can set for an item.
Presentation settings follow this syntax:
<format>
<presentation>
<settingname1>setting</settingname1>
...
<settingnamen>setting</settingnamen>
</presentation>
</format>
The following list defines the valid settings:
Using this setting forces the calendar to be type selected, regardless of the locale of the form. This setting is only valid for date types, such as date, time, and so on.
Default for en_US locale: gregorian.
Default for other locales:gregorian.
This setting is only valid for string and date (date, time, and so on) data types.
Default: none.
Valid settings include all valid locales. For a complete list of locales and their corresponding codes, see Locale Specification for XFDL.
Note that this setting does not convert currencies in any way.
Default: the locale of the form.
100.00
You can use any string. This setting is only valid for int, float, and currency data types.
Default for en_US locale: a period.
Default for other locales: refer to the Locale Specification for XFDL.
13.764
All values are rounded according to the round setting. If no round setting is specified, all values are rounded up. (See the round setting for an explanation of rounding up.)
Fractiondigits is only valid for float and currency data types. Note that setting both fractiondigits and significantdigits may cause conflicting formats. In this case, significantdigits takes precedence.
Default: the maximum number of digits allowed for the data type.
1,000,000
You can use any string, with the keyword none representing no separators at all. However, you should not use strings that already have a meaning, such as the period.
This setting is only valid for int, float, and currency data types.
Default for en_US locale: a comma.
Default for other locales: refer to the Locale Specification for XFDL.
Default: off.
<negativeindicator>
<prefix>prefix</prefix>
<suffix>suffix</suffix>
</negativeindicator>
The prefix and suffix are defined as strings. For example, if you set the prefix to an open bracket and the suffix to a close bracket, you will get a bracket negative. The following shows the bracket notation for negative 100:
(100)
You can also leave either the prefix or suffix blank, so long as the other setting has a value.
Default for en_US locale: minus sign (-).
Default for other locales: refer to the Locale Specification for XFDL.
00002
00100
If the value has more characters than dictated by the pad setting, the value is not changed and is displayed as entered.
Pad is only valid for integer, float, and currency data types. Use the padcharacter setting to control which character is used to pad the value.
Default : 0 (no padding imposed).
00010
01245
You may only specify a single character as the pad character. Furthermore, you must use a pad character that is valid for your data type. For example, you cannot use a Z in an integer value.
Padcharacter is only valid for integer, float, and currency data types. Use the pad setting to control how many pad characters are used.
Default for en_US locale: 0.
Default for other locales: refer to the Locale Specification for XFDL.
To learn how to represent number and date patterns, refer to Date patterns.
Note that the pattern setting overrides both the style and negativeindicator settings.
You must define each pattern in its own <patternref> tag, as shown:
<patternrefs>
<patternref1>pattern</patternref1>
...
<patternrefn>pattern</patternrefn>
</patternrefs>
If you define only one pattern, that pattern is used for all input regardless of the number of constraints you define.
If you define more than one patternref, you must define an equal number of patterns in the constraints. Each pattern is then matched to the corresponding constraint. For example, the first pattern is matched to the first constraint, the second pattern is matched to the second constraint, and so on. This allows you to define a different pattern for each constraint.
To learn how to represent string patterns, refer to String patterns.
Note that the patternrefs setting overrides the style setting.
Default: as dictated by the style setting.
Round is only valid for integer, float, and currency data types.
Default: half_even.
The symbol used is determined by the currencylocale setting. If there is no currencylocale setting, it defaults to normal currency symbol for the current locale.
Default: on.
If the data entered exceeds the number of significant digits allowed, then only the least significant digits are shown. For example, if you allow five significant digits and 12,345.56 is entered, then only 12,345 is shown. If you allow five significant digits and 1,234,543.21 is entered, then only 1,234,500 is shown.
significantdigits is only valid for integer, float, and currency data types.
Note that setting both fractiondigits and significantdigits may cause conflicting formats. In this case, significantdigits takes precedence.
Default: the maximum number of digits allowed for the data type.
Valid settings are:
For more information about how the styles affect the different data types, see Data type styles.
Note that both the pattern and patternrefs settings override the style setting.
Default: medium.