This topic describes how to configure the message model, and includes the following sections:
Some objects, such as elements, have both properties that are associated with them as standalone objects, and properties that are associated with them as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most are left to their default values.
To configure the properties of the objects as standalone objects (such as elements), set the properties as listed in the table below:
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
Town | ||||
Street | ||||
HouseNo | ||||
{Local complexType} | Composition = orderedSet | Data Element Separation = Tagged Delimited Group Indicator = [ Group Terminator = ] Delimiter = * Tag Data Separator = : |
Composition for {Local complexType} is set to OrderedSet because the elements must appear in order. Alternatively, Composition could be set to Sequence. When Composition is set to OrderedSet, elements appear in order, and cannot be duplicated. When Composition is set to Sequence, elements still appear in order, but can be duplicated. A duplicate element is an element included more than once anywhere within the complex type.
The other logical properties for {Local complexType} are left to take their default values. The default setting for Content Validation is Closed; this means that the complex type {Local complexType} can contain only the elements that are its members. If Content Validation was set to Open, this complex type could contain any element, and not just those defined in this message set.
Data Element Separation is set to Tagged Delimited to demonstrate different types of data element separation. Use the links at the end of this topic to find out more about different data element separation settings.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as listed in the table below:
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
Town | Address > {Local complexType} | Length count = 20 | |||
Street | Address > {Local complexType} | Length count = 20 | |||
HouseNo | Address > {Local complexType} | Length count = 4 Physical Type = External Decimal 'Signed' check box = not selected String Justification = Left Justify Padding Character = SPACE |
|||
{Local complexType} | Address |
Some objects, such as elements, have two sets of properties: those that are associated with the objects as standalone objects, and those that are associated with objects as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most are left to take their default values.
To configure the properties of the objects as standalone objects (such as elements), set the properties as shown in the table below. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
VideoTitle | ||||
DueDate | ||||
Cost | ||||
{Local complexType} |
|
Data Element Separation = All Elements Delimited Group Indicator = [ Group Terminator = ] Delimiter = * |
You do not need to set any logical properties for {Local complexType}, as these are left to take their default values. Data Element Separation is set to All Elements Delimited to demonstrate different types of data element separation. For more information about how All Elements Delimited differs from Tagged Delimited, see Data element separation.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as shown in the table below. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
VideoTitle | Borrowed > Anonymous | Length Count = 20 | Render = XMLAttribute | ||
DueDate | Borrowed > Anonymous | Length Count = 10 DateTime Format = yyyy-MM-dd |
DateTime Format = yyyy-MM-dd | ||
Cost | Borrowed > Anonymous | Length Count = 4 | |||
{Local complexType} | Borrowed |
The rendering option for VideoTitle is set to XMLAttribute to demonstrate different ways of configuring the message model. Creating VideoTitle as an element and rendering it as an attribute is just one possible way of configuring the object. VideoTitle could be configured in any of the following ways:
In the last two options, VideoTitle appears in exactly the same form in the message. That is, you can achieve the same result by either configuring the object as an attribute, or configuring it as an element rendered as an attribute. Rendering options can be used if you need to, for example, change an element into an attribute (or vice versa) after the object has been created, but there are other reasons for using different rendering options. For example, there might be business reasons for creating several elements with the same name, and then using rendering options to give them different identifiers.
Some objects, such as elements, have two sets of properties: those that are associated with the objects as standalone objects, and those that are associated with objects as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most are left to take their default values. For more information, use the links at the end of this topic.
To configure the properties of the objects as standalone objects (such as elements), set the properties as shown in the table below. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
FirstName | Tag = FirstName | |||
LastName | Tag = LastName | |||
Title | Tag = Title | |||
NameType | Composition = orderedSet Content Validation = Open |
Data Element Separation = Tagged Delimited |
||
ID | Tag = ID | |||
CreditCardNo | Tag = CreditCardNo | |||
DrivingLicenseNo | Tag = DrivingLicenseNo | |||
PassportNo | Tag = PassportNo | |||
IdGroup | Composition = Choice Content Validation = Closed |
Data Element Separation = Tagged Delimited Delimiter = & Tag Data Separator = : |
||
brw:Borrowed | ||||
Magazine | Tag = Magazine | |||
CustomerType | Composition = Sequence Content Validation = Open |
Data Element Separation = Tagged Delimited Group Indicator = { Group Terminator = } Delimiter = & Tag Data Separator = : |
Setting the Content Validation of NameType to Open means that duplicate elements are not allowed, but other elements that are not defined in this type are allowed. A duplicate element is an element included more than once anywhere within the complex type. Content Validation for NameType is set to Open to demonstrate another Content Validation option.
Composition of NameType is set to OrderedSet because the elements must appear in order. Alternatively, Composition could be set to Sequence. Sequence is the default value for Composition, and is used, for example, for CustomerType. When Composition is set to OrderedSet, elements appear in order, and cannot be duplicated. When Composition is set to Sequence, elements still appear in order, but can be duplicated.
Setting Composition of IdGroup to Choice means that you can now choose only one of PassportNo, DrivingLicenseNo, or CreditCardNo as the type of identifier used as proof of identity when a customer opens an account with the video store. Setting Content Validation to Closed means that you can only choose from these three options. For example, if Content Validation was set to Open Defined, you could choose other elements defined within your message set.
Use the links at the end of this topic to find out more.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as shown in the table below. You must perform all the configuration tasks listed in the table below in the Customer.mxsd message definition file. Remember that you must select the object under the object of which it is a member. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
FirstName | NameType | Length Count = 20 Repeat Count = 1 | |||
LastName | NameType | Length Count = 20 | Render = XMLAttribute | ||
Title | NameType | Length Count = 3 Repeat Count = 1 | |||
NameType | Customer | ||||
ID | CustomerType | Length Count = 1 Repeat Count = 1 |
|||
CreditCardNo | IdGroup | Min Occurs = 0 | Length Count = 20 |
|
|
DrivingLicenseNo | IdGroup | Min Occurs = 0 | Length Count = 20 | ||
PassportNo | IdGroup | Min Occurs = 0 | Length Count = 20 | ||
IdGroup | |||||
brw: Borrowed | CustomerType | Min Occurs = 0 Max Occurs = 3 |
Repeat Count = 2 | Repeating Element Delimiter = * | |
Magazine | CustomerType | Min Occurs = 0 | |||
CustomerType |
The rendering option for LastName is set to XMLAttribute to demonstrate different ways of configuring the message model. This was also the case for VideoTitle in the previous section, Configuring properties of the Borrowed message definition.
For the object brw:Borrowed, the repeat count for CWF is set to 2 to reflect the number of videos borrowed, as indicated in the input message. Because the XML and TDS formats use delimiting tags to show where each repeat starts and finishes, you do not need to specify a repeat count for XML and TDS. If it was the case that you did not know in advance how many times a repeating element would repeat, you would have to include an additional integer field in the message model, use ESQL to populate this field dynamically with the number of repeats, change Repeat Count to Repeat Reference, and put in a reference to the value of that integer field.
Because the element Magazine is of type 'boolean', you must also configure the Boolean values used throughout the message set. To set the Boolean values:
Property | Value |
---|---|
Boolean True Value | 31 |
Boolean False Value | 30 |
Boolean Null Value | 00 |