2.1.3.11 ConvertType

Target namespace: http://schemas.microsoft.com/windows/2007/BusinessDataCatalog

Referenced by: Interpretation

A complex type that specifies the rule to convert the data type of a data value into another data type. When the rules are applied in order, this rule specifies the data type of the data value to be converted to the data type specified by BDCType attribute. When the rules are applied in reverse order, this rule specifies the data type of the data value to be converted to the data type specified by LOBType attribute. For example, this rule can specify converting a date value obtained from a line-of-business (LOB) system, into a culture and locale sensitive string which will eventually be displayed to the user, and converting the updated value for that string back into the date compatible with the LOB system.

Attributes:

LOBType: A TypeNameString attribute (section 2.1.4.16) that specifies the data type to convert the data value into when the rules are applied in reverse order.

BDCType: A TypeNameString attribute that specifies the data type to convert the data value into when the rules are applied in order.

LOBLocale: A TypeNameString attribute that specifies the locale that the data is expected to be formatted according to, when the rules are applied in order, and the locale that the data MUST be formatted according to, when the rules are applied in reverse order. The value of this attribute MUST be ignored when the data does not have a locale specific formatting. For example, if the data is converted between an integer value and a string, value 1234 can be converted to "1234", "1.234" or "1,234" based on the specified locale. However, if the data is converted from an integer to a floating point number, the value is usually stored in an implementation-specific condensed form where a locale specific format is not applicable; therefore this attribute would be ignored.

The following W3C XML Schema ([XMLSCHEMA1/2] section 2.1) fragment specifies the contents of this complex type.

 <xs:complexType name="ConvertType">
   <xs:attribute name="LOBType" type="bdc:TypeNameString" use="required"/>
   <xs:attribute name="BDCType" type="bdc:TypeNameString" use="required"/>
   <xs:attribute name="LOBLocale" type="bdc:TypeNameString" use="optional"/>
 </xs:complexType>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1/2] section 2.1).