Namespaces

Meta Data Services Programming

Meta Data Services Programming

Namespaces

In the Open Information Model (OIM), classes and associations share the same namespace for a single information model. This means that more than one class and/or association within the same information model cannot share the same name. The following table shows the basic structure of the OIM namespace hierarchy.

Level 1 Level 2 Description
Information Model   Corresponds to an information model
  Class Class name and the associated attributes
  Association A collection of nested or linked classes

The OIM-to-Extensible Makeup Language (XML) mapping combines XML Namespaces and a naming convention to provide the following solution.

< Namespace : Name >
< Information Model Prefix : Class Name >
< Information Model Prefix : Association Name >

For example, <x:y> is an element tag for an object of class y in submodel x. Note that because attributes are represented as XML attributes they are scoped as part of the element. Therefore, the attribute names need to be unique only within the class, not the whole subject area of the model.

If attributes in the inheritance chain of the class share the same name, the names of the attributes are expanded to ClassName.AttributeName. If the class name is not unique, it is prefixed with the same information model prefix as the namespace.

See Also

XML Encoding Reference

Namespaces in OIM