Message sets: Importing from DTDs to create message definitions
You can populate a message set with message definitions by importing DTD files, by using either the New Message Definition File From XML DTD file wizard .
Each XML DTD file that you import results in a new message definition file within the message set. The root name of the message definition file defaults to the root name of the XML DTD file, but the New Message Definition File From XML DTD file wizard allows you to choose a different root file name.
If the message definition file exists, you must have permitted overwriting to occur for the import to proceed, in which case the existing content is deleted and re-created.
All message definition files that are created as a result of DTD
file import belong to the noTarget
XML namespace
and so are contained in the (default)
location in
your workspace.
A report file is created during the import operation, by default in the log folder of the message set. By default, it takes the name of the message definition file, with .report.txt appended.
Import by using the New Message Definition File From XML DTD file wizard
When you import by using the "New Message Definition File From XML DTD file" wizard, you can specify which of the elements within the imported XML DTD file are to be messages within the message definition file.
You can import only one XML DTD file with each import operation.
Import by using the command line
When you import by using the command line you have the option of either creating no messages or creating a message for each element within the imported XML DTD file. The import operation creates a message and a corresponding element in the message definition file for each element that you specify. If you do not specify that messages are to be created, you must create them manually using the message definition editor after the import has completed.
You can import several XML DTD files in each import operation.
Physical information
In addition to creating logical information, the import can also create physical information. If the message set contains any XML wire format physical formats, the physical format properties for all XML Wire Format layers is populated. If the message set does not contain any XML physical formats, only logical information is created. Also, if you import from the command line, only logical information is created in the new message set by default. If you want physical information created as well, see Message Sets: Importing from the command line for details.
MRM CWF and TDS physical format properties are not populated and therefore take default values.
If you have one or more CWF or TDS layers, the import can cause entries in the task list, warning you that certain CWF or TDS properties must be set if the XML structures that you have imported are to appear in a CWF or TDS message.
If the CWF or TDS physical formats are not applicable to your XML structures, you can ignore these task list entries because they are just warnings; they do not prevent your model being generated in another form, such as a message dictionary.
Command-line invocation
The mqsicreatemsgdefs command-line utility allows you to import several XML DTD files in a single operation. All the XML DTD files must be in single directory, and the directory location must be passed as a parameter to the utility.
The mqsicreatemsgdefs utility also allows you to create a message set into which the message definition files are placed, as part of the import operation. You can also choose to base the message set created on an existing message set. This facility enables you to prepare an empty message set that contains an XML physical format and pre-populated message set level XML properties, which are then copied into the message set that is created by the import.
Further information about XML DTDs
For details about XML DTDs, see the World Wide Web Consortium (W3C) website.