2.4.2.11 datafmt
The following controls can contain the datafmt attribute in their XSLT representation:
Combo box (section 2.3.2.2)
Date picker (section 2.3.1.4)
Expression box (section 2.3.1.6)
Multiple-selection list box (section 2.3.2.9)
Text box (section 2.3.1.16)
All other controls MUST NOT contain this attribute in their XSLT representations.
The value of this attribute MUST follow this structure:
""<FormatCategory>","<FormatSpecification>""
FormatCategory specifies the type of formatting applied when the control displays the XML field's data.
The FormatCategory string MUST be set to one of the following:
currency: Specifies that the data from the XML field be formatted as type currency when displayed in the corresponding control.
date: Specifies that the data from the XML field be formatted as type date when displayed in the corresponding control.
datetime: Specifies that the data from the XML field be formatted as type datetime when displayed in the corresponding control.
number: Specifies that the data from the XML field be formatted as type number when displayed in the corresponding control.
percentage: Specifies that the data from the XML field be formatted as type percentage when displayed in the corresponding control.
string: Specifies that the data from the XML field be formatted as type string when displayed in the corresponding control.
time: Specifies that the data from the XML field be formatted as type time when displayed in the corresponding control.
FormatSpecification specifies the data formatting properties applied when the control displays an XML field's data.
The following table defines which format specifications MUST be specified for each format category.
FormatCategory |
Supported FormatSpecification |
---|---|
currency |
locale, numDigits, grouping, decimalSep, thousandSep, negativeOrder, positiveOrder, currencyLocale |
date |
locale, dateFormat, useAltCalendar, englishStringsAlways |
datetime |
locale, dateFormat, timeFormat, useAltCalendar, englishStringsAlways, noSeconds |
number |
locale, numDigits, grouping, decimalSep, thousandSep, negativeOrder |
percentage |
locale, numDigits, grouping, decimalSep, thousandSep, negativeOrder |
string |
plainMultiline |
time |
locale, timeFormat, noSeconds |
FormatSpecification MUST be a semicolon-delimited list of one or more specification items. Each specification item MUST have the proper structure according to the following table.
Name of specification item |
Structure of specification item |
---|---|
plainMultiline |
"itemName" |
Any other name |
"itemName:itemValue" |
The format specification item names MUST be set to the following and adhere to the specified value requirements:
currencyLocale: The LCID, as specified in [MS-LCID]. Used to map the currency symbol string determined by the currency locale.
dateFormat: The date format pattern to use when displaying date and time values.
The value MUST be one of the following:
Short Date: A short date format.
Long Date: A long date format.
Year Month: A year month format.
none: No date format pattern applied.
A date format pattern specified in [ISO-8601].
decimalSep: The string to display as the decimal separator in numeric values.
The value MUST be one of the following:
'.' (period)
',' (comma)
' ' (space)
' ' (nonbreaking space)
''' (single quote)
'،' (Arabic comma)
Empty (no separator)
If unspecified, the decimal separator is determined based on the form server settings.
englishStringsAlways: A Boolean value that specifies the ability to use English as the LCID, as specified in [MS-LCID], when displaying date and date time values.
The value MUST be one of the following:
"0": Use the locale specified by the LCID.
"1": Use English as the LCID.
If unspecified, the behavior MUST be the same as a specification item value of zero ("0").
grouping: The digit grouping pattern for digits to the left of the decimal.
The value MUST be one of the following:
Range from zero ("0"), meaning no grouping, through "9".
"32"
If unspecified, the grouping is determined based on the form server settings.
locale<5>: The LCID, as specified in [MS-LCID]. If unspecified, the locale is determined based on the locale of the protocol server.
negativeOrder: The format pattern for negative numeric values.
If the value is "-1", the negative order is determined by the default pattern associated with the form server's locale identifier, as specified in [MS-LCID].
If unspecified, the negative order is determined based on the form server settings.
noSeconds: A Boolean value that specifies whether to display seconds in time formatting.
The value MUST be set to one of the following:
"0": Display seconds for time formatting.
"1": Do not display seconds for time formatting.
If unspecified, the behavior MUST be the same as a specification item value of zero ("0").
numDigits: The number of fractional digits to display after the decimal separator.
The value MUST be set to one of the following:
Range from zero ("0") through "9".
"Auto": Specifies the general numeric format string as implemented by the form server.
If unspecified, the number of digits is determined based on the form server settings.
plainMultiline: Specifies the ability for a text box control to display data across multiple lines. The value MUST be set to an empty string (1).
positiveOrder: The format pattern for positive currency values.
If the value is "-1", the positive order is determined by the default pattern associated with the form server's locale identifier, as specified in [MS-LCID].
If unspecified, the positive order is determined based on the form server settings.
thousandSep: The string that separates groups of digits to the left of the decimal in numerical values.
The value MUST be one of the following:
'.' (period)
',' (comma)
' ' (space)
' ' (nonbreaking space)
''' (single quote)
'،' (Arabic comma)
Empty (no separator)
If unspecified, the thousand separator is determined based on the form server settings.
timeFormat: The time format pattern to use when displaying time values.
The value MUST be one of the following:
Short Time: A short time format.
Long Time: A long time format.
none: No time format pattern applied.
A time format pattern specified in [ISO-8601].
If unspecified, the time format is determined based on the form server settings.
useAltCalendar: A Boolean value that specifies the ability to display an alternate calendar for calendar formatting, as specified in [MS-WSSFO2] section 2.2.3.3.
The value MUST be one of the following:
"0": Use the calendar type associated with the locale identifier, as specified in [MS-LCID].
"1": Use the alternate calendar type for the locale identifier, as specified in [MS-LCID].
If unspecified, the behavior MUST be the same as a specification item value of zero ("0").
If the format category is "datetime", at least one of the specification items timeFormat and dateFormat MUST have the value "none".
The combinations of locale and date and time format in the following table MUST NOT be present.
Locale |
Date and time format |
---|---|
1028 |
"M'\u6708'd'\u65E5'" |
1036 |
"HH' h 'mm" |
1037 |
"dd \u05D1MMMM yyyy" |
1037 |
"dddd dd \u05D1MMMM yyyy" |
1037 |
"ddd dd \u05D1MMMM yyyy" |
1038 |
"MMMM d." |
1041 |
"M'\u6708'd'\u65E5'" |
1042 |
"M'\uC6D4' d'\uC77C'" |
1045 |
"d MMMM" |
1052 |
"MMMM dd" |
1052 |
"h:mm.tt" |
1052 |
"h:mm:ss.tt" |
1053 |
"'den 'd MMMM" |
1054 |
"MMMM dd" |
1062 |
"d. MMMM" |
1063 |
"MMMM d 'd.'" |
1066 |
"dd MMMM yyyy" |
1066 |
"dd MMMM" |
1066 |
"MMMM yyyy" |
1069 |
"MMMM dd" |
1078 |
"dd MMMM" |
1079 |
"yyyy '\u10EC\u10DA\u10D8\u10E1' dd MM, dddd" |
1104 |
"d MMMM" |
1125 |
"MMMM dd" |
2052 |
"M'\u6708'd'\u65E5'" |
2060 |
"dd-MMM-yy" |
2060 |
"H' h 'mm" |
2060 |
"H' h 'm' min '" |
2060 |
"H' h 'm' min 's' s '" |
2067 |
"H.mm' u.'" |
2070 |
"HH'H'mm'm'" |
3079 |
"d.MMMyyyy" |
3082 |
"HH'H'mm'\''" |
3084 |
"d MMMM" |
3084 |
"H' h 'mm" |
5132 |
"HH' h 'mm" |
6156 |
"HH' h 'mm" |
7177 |
"dd MMMM" |
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.
-
<xsd:element name="datafmt" type="xsd:string"/>