Predefined and self-defining elements and messages

An instance element is predefined if it is possible for the parser to find a matching element definition in the message model with an appropriate set of properties and in the correct context. Otherwise, it is self-defining. Similarly, an entire message is self-defining if no corresponding message is present in the message model.

Self-defining elements can only be used when the physical format of the message is a tagged format such as XML or TDS. If your physical format is fixed-length (C or COBOL records) or untagged delimited (for example, comma separated), you must ensure that your message model defines every message and every element that needs to be parsed.

If you have chosen not to model your messages, or if no message sets have been deployed to the broker, all messages and elements are self-defining. In this situation, you cannot use message definitions to influence the parsing and writing of elements; the self-defining elements are parsed and written according to the default behavior of the parser and writer.

Self-defining elements, and all elements within a self-defining message, are not validated against value constraints, and any missing fields are not assigned default or fixed values, and all data is assumed to be string type.

However, if an element can be matched against the message model, the parsing and the writing of the element is guided by the logical and physical formats that have been defined. This provides a range of benefits, all of which arise from the information that is provided to the broker through the message model.

Related concepts
Why model messages?
Message model objects: simple type value constraints
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:21:03

ad10520_