Elements and Attributes

Meta Data Services Programming

Meta Data Services Programming

Elements and Attributes

Elements in Extensible Markup Language (XML) are enclosed within a pair of tags. Each pair includes an opening tag and a closing tag. The content can be either a structure of sub-elements or an unstructured data representation. The following table shows how the meta data element types, which are used to describe the Open Information Model (OIM), are mapped into XML.

Element XML representation
Information Model No mapping. For more information, see Namespaces.
Concrete Class <class_name>...</class_name>
Attribute Included as an XML attribute on an XML element, for example, attribute=value.
Association <association_name>...</association_name>

The tag identifies the type of an element. Additional meta information about the element can be represented by predefined attributes. The following table lists attributes that are currently predefined.

Attribute name
Defined for
Mandatory/optional
Description
OIM:id Object, association Optional Transfer identifier (ID) used to uniquely identify an element in an XML document. The id has no meaning outside of a transfer. The id is mandatory on objects, but optional on object references.
OIM:objid Object, association Optional Unique identifier of an element in the source or target repository.
OIM:href Objects Optional Hyperlink mechanism to reference objects.
OIM:label Objects Optional The name of an object within the encapsulating association.
OIM:supertype Object Optional Used by extensions to indicate the OIM type that can be used for importing an object.

The OIM-to-XML mapping separates the transfer ID and object ID and treats the object ID as an attribute of the element. This XML encoding is designed to enable the interchange of objects between heterogeneous repositories. There is no common format for object identifiers; furthermore, there is no agreement on how to implement object identity (name based, GUID, disk pointer, and so on).

To provide a generic solution, a uniquely defined ID identifies an object within a transfer; that is, an ID can serve as the target of a reference in the transfer. The structure of the ID is unspecified, but it must be unique in a transfer and it must contain an underscore as the first character. Examples of valid transfer IDs are a running number ("_007") or the name of an object ("_Invoice007").

Note that object identity is necessary to allow a meaningful synchronization of objects between repositories. In a heterogeneous environment, this requires the XML encoding to maintain a cross-reference between the globally unique identifiers (GUIDs) of objects maintained by different repository products. To exchange object IDs as attributes of objects, exchanging repositories must agree on the semantics of the exchange mechanism. To simplify this process, the attribute objid is included in the encoding format. If necessary, the first source of a transfer can generate the object ID. Each successive transfer step must maintain the whole object ID and pass it on.

See Also

XML Encoding Reference