IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Reusing message model files

One message model schema file or message definition file can reuse message model objects defined in another file.

There are two mechanisms that XML Schema provides to reuse message definition files: import and include. The namespaces of the two files determine which of the import or include commands is 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
Note: 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 be present 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 that includes a notarget namespace file. This exception is sometimes called the chameleon namespace effect.

A message model schema file can import or include another file in the same application or library, or in a separate message broker library. A message definition file can import or include another file only if it is in the same message set.

XML Schema provides a variation of xsd:include called xsd:redefine, which is supported when using message model schema files, but not when using message definition files. A Quick Fix is offered to convert occurrences of xsd:redefine into xsd:include when using message definition files.


ad30780_.htm | Last updated Friday, 21 July 2017