Namespaces with MRM XML messages

The namespace that is associated with a message definition file is part of the logical layer of the message model.

Therefore, it is not dependent on an XML Wire Format being present. However, if you have an XML Wire Format, the namespace information from the logical layer is used to populate some of the properties of the XML Wire Format. If namespaces are enabled for a Message Set, in the XML Wire Format, a table of namespace URI/prefix pairs is maintained. This table is initially populated with the namespaces of all of the Message Definition Files with their prefixes when they were created.

If your message set has namespaces enabled, the integration node does not store the values of any xmlns attributes in the tree when it parses an XML instance document. It also does not store the values of any Schema Location and No Namespace Schema Location attributes. When an XML document is written out, the integration node regenerates this information from the properties of the XML Wire Format of the message set.

The table of namespace URI/prefix pairs is used by the MRM Domain when it produces an XML message. Elements and attributes that are qualified by a namespace are prefixed with the corresponding prefix from the table. The integration node also manages the output of the corresponding xmlns attributes that map the prefixes to namespaces. You can choose whether xmlns attributes for all of the entries in the namespace URI/prefix table are written at the start of the document, or whether they are only written in the document when required.

If namespaces are enabled for a Message Set, in the XML Wire Format there is a table of schema locations that map namespace URIs to file names. You can add entries to this table and you can map a file name to the notarget namespace. If you are using IBM® Integration Bus, this table is used to produce schemaLocation and No Namespace Schema Location attributes at the start of the XML document.