Compiling/Recompiling

DTD/Schema/DTD-Containing-XML definition files must be compiled into OCM files before they can be used in the system.

Each XML definition file is compiled into a system-specific internal file called our content model files, designated by the .ocm extension. This file is placed in the same folder as the root of the XML DTD/Schema/DTD-containing-XML that was compiled. These .ocm files are for internal purposes only and are not intended to be user-edited.

During the compilation process, the compiler resolves all external references from the root.

Although they exist in the same folder as the compiled file, they are not shown in the Package Manager’s view of the containing package folder. Files with an .ocm extension may be shown at other file-tree folder levels.

Each successfully created OCM file is a system expression of the structure of an XML message originally described by the original DTD/Schema/DTD-containing-XML.

An OCM file is necessary to relay that structure to the parts of the system that require the information, such as the Translation Configurator.

An OCM file must be created before you can select that format for an XML message.

Note: Tampering with OCM files can cause your XML implementations to become unstable. OCM update does not automatically happen if a DTD/Schema/DTD-containing-XML should change. If one of the original files defining the structure of an XML message changes, then use the Compile option in the XML Package Manager. You can also use hcixmlcompile on the command line to update the associated OCM.

In addition to OCM files, an ocmIndex file is generated. This keeps track of the relationship between the OCM files and the original DTD or Schema files. Each package directory has an index file.

To compile, you can use the hcixmlcompile command-line tool or the Compile option in the XML Package manager.

  • In the XML Package Manager, select a file/folder and click Compile on the toolbar or from the right-click menu.

    It is also possible to specify a root element and output name as at the command line. This is available only if a single file is selected when Compile is clicked. In this case, when Compile is clicked, the Compile Options dialog box opens.

  • From the command line, run hcixmlcompile.

    See hcixmlcompile.

Both methods invoke hcixmlcompile and pass to it the package name and file name only. You can also select multiple files and compile them at one time.

When compiling a Schema that contains more than one global element definition, the -r option must be used with -o. This specifies which root element to use.