A simple type is an abstract definition of an item of data such as a number, a string or a date.
The purpose of a simple type is to define the content of one or more simple elements. Simple types (and any elements based on them) cannot contain attributes or child elements. Simple types stand in contrast to complex types, which define the structure of an element but usually do not define any simple data.
Simple types can be global or local. A global simple type can be used as the basis for more than one element. It must be given a unique name by which it can be referenced. A local simple type is associated with a single element, and is not available for reuse elsewhere in the message model. Local types do not need a name, and are displayed as {Local simpleType} by the message definition editor.
A list type is a way of rendering a repeating simple value. The notation is more compact than the notation for a repeating element, and offers a way to have multi-valued attributes. A list type can not have value constraints applied to it.
In the message tree, a list type will be represented as a name node with an anonymous value child for each list item. This allows repeating lists to be handled without any loss of information and is consistent with XPATH and SDO which both make a distinction between a list and a repeating element. Repeating lists will appear as sibling name elements, each of which has its own anonymous value child nodes for its respective list items.
A list type can be based on a union type. This can describe a space-separated list of items in which each item can be based on any of the simple types in the union.
A list of lists is not legal. The item type of a list cannot be a list itself or derived at any level from another list type and will result in a task list error in the editor.
TDS and CWF will not support list types. Lists are a very XML-specific concept and any attempt to use lists within the TDS or CWF layer will result in task list errors in the message editor. The dictionary generator will omit the message from the CWF dictionary if it contains a list type and a warning will be displayed in the user log. For TDS, the worker will report an error if it encounters a list type in a message definition.
A simple type can be derived from another simple type (the base type) by restriction. A restriction type can have value constraints applied to it.
A restriction type may be defined as a built-in simple type, a user defined simple type or a local simple type defined anonymously within the restriction.
A union type is as a union of two or more other simple types. A union type can not have value constraints applied to it.
A union type allows a value to conform to any one of several different simple types. The simple types that compose a union type are known as its member types. There is no upper limit on how many member types may exist, but there must be at least one. A member type may be defined as a built-in simple type, a user defined simple type or a local simple type defined anonymously within the union type.
A union type can include list types among its members.
The XML properties of an element based on a union type will vary depending on the members of the union. If the union includes a DateTime member type (or other date/time related type) the Date Format field will be displayed. If the union includes a binary member type, the Encoding field will be displayed.
TDS will treat union types as strings. CWF will treat a union type as a binary element. Task list warnings will appear in the message editor advising of these restrictions.
Any value constraints applied to the derived type must further restrict the base type (and any elements based on it). It is illegal for a derived type to weaken or remove a value constraint which its base type has defined. If no value constraints are applied to the derived type, it will be almost identical to its base type, although it will be treated as a restriction of the base type in situations where that is relevant (type inheritance and element substitution).
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ad10401_ |