WebSphere Message Brokers
File: ad30780_
Writer: Terry Cowling

Concept topic

This build: July 31, 2007 21:26:48

Reusing message definition files

One Message Definition File can reuse message model objects defined in another Message Definition File. There are two mechanisms that XML Schema provides to do this: import and include. The namespaces of the two files determine which of import or include should be used:

  Target file has a target namespace Target file has notarget namespace
Parent file has a target namespace xsd:import xsd:include1
Parent file has notarget namespace xsd:import xsd:include
  1. When a target namespace file includes a notarget namespace file, referencing an object in the target file from the parent file causes the object to appear in the namespace of the parent file.

When import or include are used, global objects from the target file can be used in the parent file. For example, an element in the parent file can be given a complex type defined in the target file.

The namespace of objects in the target file is preserved in the parent file, with the exception noted in the previous table of a target namespace file including a notarget namespace file. This exception is sometimes called the chameleon namespace effect.

Chameleon namespaces have limited support when used with the MRM domain. When referenced in the parent file, the objects in the target file appear in the namespace of the parent file, but they are assigned default physical format information. In other words, physical format information defined in the target file is not available for use in the parent file. Only use Chameleon Namespaces in the MRM domain to model XML messages where physical format information has not changed from the default.

XML Schema provides a variation of xsd:include called xsd:redefine, which is not supported by WebSphere Message Broker. Using xsd:redefine will give a task list error. A Quick Fix is offered to convert occurrences of xsd:redefine into xsd:include.

Related concepts
Namespaces in the message model
Namespaces with non-XML messages
Specifying namespaces in a Message Type
Related tasks
Applying a Quick Fix to a task list error
Creating a message set
Creating a message definition file
Related reference
Message definition file properties
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:26:48

ad30780_ This topic's URL is: