2.56.1 Literal.DataType

The Literal.DataType element specifies the data type of the value of the literal.

The Literal.DataType element MUST be specified. Its value MUST be a String. The value of the sibling Literal.Value element or the collection of values of the sibling Literal.Values element MUST be able to be interpreted as the data type specified by the value of the Literal.DataType element. In the case where the Literal.DataType element does not have the value "EntityKey", the interpretation of the data type conforms to the XSD standard. Additionally, the value of the Literal.Value element or the collection of values of the sibling Literal.Values element is treated as a Variant data type.

The value of the Literal.DataType element MUST be one of the following:

Boolean: Specifies that the data type of the attribute is the SMDL data type Boolean corresponding to the CLR data type Boolean.

DateTime: Specifies that the data type of the attribute is the SMDL data type DateTime corresponding to the CLR data types DateTime and DateTimeOffset.

Time: Specifies that the data type of the attribute is the SMDL data type Time corresponding to the CLR data type Timespan.

Integer: Specifies that the data type of the attribute is the SMDL data type Integer corresponding to the CLR data types Int16, Int32, Int64, UInt16, UInt32, Byte, and SByte.

Decimal: Specifies that the data type of the attribute is the SMDL data type Decimal corresponding to the CLR data types Decimal and UInt64.

Float: Specifies that the data type of the attribute is the SMDL data type Float corresponding to the CLR data types Single and Double.

String: Specifies that the data type of the attribute is the SMDL data type String corresponding to the CLR data types String, Char, and Guid.

EntityKey: Specifies that the data type of the attribute is the SMDL data type EntityKey, which is a tuple of key column values for an entity and does not correspond to any CLR data type.

The value of the Literal.DataType element MUST NOT be "Binary".

The following is the parent element of the Literal.DataType element.

Parent elements

Literal

The following is the XML Schema definition of the Literal.DataType element.          

 <xsd:element name="DataType" type="LiteralDataTypeEnum" />