[This local archive copy is from the official and canonical URL, http://www.dmtf.org/cim/cim_xml/CIM_XML_Mapping10.html, 1998-10-12; please refer to the canonical source document if possible.]

Desktop Management Task Force, Inc.

Specification for the representation of CIM in XML

Version 1.0

September 15th, 1998

 

Technical inquiries and editorial comments should be directed in writing to:

Desktop Management Task Force, Inc. (DMTF)

c/o MacKenzie Kesselring, Inc.
200 SW Market Street, Suite 450,
Portland, OR 97201
(503) 225-0725
(503) 225-0765 (fax)
email:
dmtf-info@dmtf.org

Participants

This list shows the names of the companies and organizations that have participated in the Desktop Management Task Force - CIM TDC XML Sub-Committee whose contributions made this document possible.

 

Change History

Version 1.0a Tuesday, July 14th, 1998 First Draft Release
Version 1.0b Friday August 7th, 1998 Draft Release
Version 1.0c  Friday Aigust 28th, 1998 Updated Version during Company review
Version 1.0 Tuesday, September 15th, 1998 Final version


Contents

Abstract
1. Introduction
2. A Note on Mapping Choices 

3. The CIM XML Schema Reference
3.1. Entity Descriptions
3.2. Element Descriptions
4. References
Appendix A -- The Complete CIM XML DTD

Abstract

The Extensible Markup Language (XML) is a simplified subset of SGML that offers powerful and extensible data modeling capabilities. An XML Document is a collection of data represented in XML. An XML Schema is a grammar that describes the format of an XML Document. An XML Document is described as valid if it has an associated XML Schema to which it conforms.

The Common Information Model (CIM) is an object-oriented information model defined by the Desktop Management Task Force (DMTF) which provides a conceptual framework for describing management data.

CIM information is currently represented in Managed Object Format (MOF). The use of XML to represent CIM information has a number of compelling advantages, which are described in full in [5].

This document is a proposal for the representation of Common Information Model (CIM) schema in XML.

Back to contents

1. Introduction

This document defines an XML grammar, written in DTD (Document Type Definition), which can be used to represent CIM classes and instances.

There are potentially many different ways in which CIM information could be represented within XML. In the interests of interoperability between different implementations of CIM there is an obvious requirement for standardization of this representation. The following criteria have been applied in the design of the representation presented here:

Whilst this document makes no restrictions on the use of this mapping, it is recognized that a number of possible usage scenarios exist for which the mapping should cater:

    1. The mapping should be capable of being rendered or transformed using standard techniques into other formats (in particular the mapping should contain sufficient information to be rendered into MOF syntax).
    2. The mapping should be applicable to the wire-level representation of CIM Classes and Instances (including the results sets of queries) in some putative CIM access protocol.

The Managed Object Format, defined in [1], has been used to determine the minimal information content of the XML Mapping for CIM. MOF syntax defines the content of a CIM Class or Instance solely in terms of "local differences" (for example, an Instance definition in MOF only describes the property and qualifier values defined locally for that Instance, and does not include any description of the inherited but unmodified properties and qualifiers). No such restriction is made in this mapping, in anticipation of requirement (2) above.

1.1. A Note On Rendering to MOF

Currently the W3C is still investigating the mechanisms by which XML documents are rendered.  The available technologies include CSS (Cascading Style Sheets) [6,7] and XSL (Extensible Style Sheet Language) [8].

CSS is already established in the HTML/SGML domain, but is limited in the nature of transformations that it can express, being essentially a formatting technology that can alter the appearance of individual elements but cannot reorganize them.  The XSL proposal attempts to address the shortcomings of CSS by providing more sophisticated reordering and scripting capabilities, but is not yet a full W3C Recommendation.

The scripting capability in XSL uses ECMAScript, and relies on an object model for access of the XML document.  The W3C is currently pursuing standardization of this model as part of the emerging DOM (Document Object Model) specifications [9].

CSS alone is not sufficient to provide a rendering of CIM XML documents into MOF.  XSL is capable of doing this, but due to the fact that neither it nor the DOM  are yet full recommendations a standard stylesheet for MOF cannot be given at this time.  Instead it is the intention to publish a companion document to this document which defines a MOF stylesheet based on the currently available stylesheet and object model technologies, and to continue to track these technologies as they evolve.

1.1.1. Qualifier Declarations

Although currently not a part of this specification, it is the intention to consider ways in which Qualifier Declarations can be described in XML.  It is a simple matter to define an extension to the DTD described herein to capture the semantics of a MOF-style Qualifier declaration. 

In addition the standard qualifiers, described in[1], could be defined within a single authoritative XML document, possibly as a series of XML General Entities.  These could then be referenced within an XML document containing schema and instances to generate a MOF with standard qualifier declarations, identical to that which exists in the current MOF specification.

It is a subject for further study as to what degree of standard Qualifier usage checking within XML documents could be afforded by the definition of standard Qualifiers in XML format.

Back to contents

2. A Note on Mapping Choices

There are two fundamentally different models for mapping CIM in XML:

Although there are obvious benefits to employing a schema mapping (more validation power, and a slightly more intuitive representation of CIM in XML), the metaschema mapping is adopted here for the following reasons:

2.1. Terminology

Throught this document the term CIM Element is used to describe one of the following components of the CIM meta-model: Namespace, Class, Property, Method or Qualifier.

The term XML Element is used to describe a component of XML defined using the ELEMENT construct in DTD.

Back to contents

3. The CIM XML Schema Reference

3.1. Entity Descriptions

This section describes each of the parameter entities used in the CIM XML Schema vocabulary. The use of Parameter Entities has been adopted to highlight common features of the DTD.

3.1.1. CIMIdentifier

The CIMIdentifier entity describes the type used for CIM Element (Namespace, Class, Property, Method and Qualifier) names.  Although it is not possible to capture the restrictions on CIM Element names using DTD constructs, the use of this parameter entity should be taken to imply that those restrictions apply.

<!ENTITY % CIMIdentifier   "#PCDATA">
3.1.2. CIMType

The CIMType entity describes the allowed type descriptions for a non-reference CIM Property, CIM Qualifier or non-reference CIM Method Parameter.

<!ENTITY % CIMType    "boolean|string|char16|uint8|uint16|sint16|uint32|
                             sint32|uint64|sint64|datetime|real32|real64">
3.1.3. QualifierFlavor

The QualifierFlavor entity describes the flavor settings for a CIM Qualifier, modeled as XML Attributes.

<!ENTITY % QualifierFlavor "OVERRIDABLE  (EnableOverride|DisableOverride) #REQUIRED
                            TOSUBCLASS   (ToSubclass|Restricted)          #REQUIRED
                            TRANSLATABLE (true|false)                     #REQUIRED">
 3.1.4. ClassOrigin

The ClassOrigin entity describes the origin of a CIM Property or Method.

The CLASSORIGIN Attribute defines the name of the originating class of the CIM element corresponding to the owning XML element.  

<!ENTITY % ClassOrigin     "CLASSORIGIN CDATA #IMPLIED">
3.1.5. Local

The Local entity is a convenient shorthand for the LOCAL attribute, which may apply to a CIM Property, Method or Qualifier.

The LOCAL Attribute indicates whether the definition of the CIM Element corresponding to the owning XML element is local to its CIM parent. The value is false if and only if:

<!ENTITY % Local           "LOCAL (true|false) #REQUIRED">

One of the possible uses of the LOCAL Attribute is to facilitate rendering into MOF syntax, which by convention only describes local overrides in a CIM Class or Instance.  To illustrate how the LOCAL attribute is used in this manner, consider the following fragment of MOF:

class A
{
  string p1;  
};

p1 is local to A
class B : A
{
  uint32 p2; 
};
p2 is local to B, but p1 is not
instance of B
{
  p1 = "erewhon";
}; 
p1 is local to this instance, but p2 is not
3.1.6. Property

The Property entity is convenient shorthand for describing the elements from which a CIM Property may be formed.

<!ENTITY % Property       "PROPERTY|PROPERTY.ARRAY">

3.2. Element Descriptions

This section describes each of the elements in the CIM XML Schema vocabulary.

3.2.1. CIM

The CIM element is the root element of every XML Document that is valid with respect to this schema. It defines a collection of CIM Classes, CIM Instances and CIM Association Instances or Clases.  CIM Associations are called out as separate elements because they lend themselves well to mapping into extended XML Links [4].

<!ELEMENT CIM (CLASS|INSTANCE|ASSOCIATION.CLASS|ASSOCIATION.INSTANCE)*>
<!ATTLIST CIM
                         CIMVERSION CDATA #REQUIRED
                         DTDVERSION CDATA #REQUIRED>

The CIMVERSION attribute defines the version of the CIM Specification to which the XML Document conforms.  The current version of CIM is 2.0, and this attribute must be assigned that value ("2.0").

The DTDVERSION attribute defines the version of the CIM XML Mapping to which the XML Document conforms.  The current version of this DTD is 1.0, and this attribute must be assigned that value ("1.0").

3.2.2. VALUE.REFERENCE

The VALUE.REFERENCE element is used to define a single CIM reference Property value.

<!ELEMENT VALUE.REFERENCE (CLASSPATH|INSTANCEPATH)>
3.2.3. VALUE

The VALUE element is used to define a single (non-array) CIM Property or CIM Qualifier value, or a single element of an array value. Values are not type-validatable using DTD, so each value appears in PCDATA format irrespective of the type. The TYPE attribute of the element will determine the (CIM) type of the value.

It is recommended that the content of a VALUE element be placed within the standard XML data escape sequence <![CDATA[ ... ]]>.  This ensures that the content is treated by XML parsers as pure character data (as long as the content does not itself contain the ]]> sequence), and hence that any <, > or & characters within the content are not interpreted as XML tags or entity references.

<!ELEMENT VALUE (#PCDATA)>
3.2.4. VALUE.INDEXED

The VALUE.INDEXED element is used to define a single element of a CIM Property or Qualifier array value.  The definition is similar to that of the VALUE element, but an INDEX attribute is supplied to identify the position in the array at which this value occurs. 

<!ELEMENT VALUE.INDEXED (#PCDATA)>
<!ATTLIST VALUE.INDEXED
              INDEX    CDATA       #REQUIRED>

The INDEX attribute value must be a legal CIM array index value.

3.2.5. NAMESPACEPATH

The NAMESPACEPATH element is used to define a Namespace Path. It consists of an optional HOST element followed by a namespace name.

<!ELEMENT NAMESPACEPATH (HOST?,NAMESPACE)>
3.2.6. HOST

The HOST element is used to define a single Host. This specification does not constrain the manner in which a host is identified (IP address, hostname etc.).

<!ELEMENT HOST (#PCDATA)>
3.2.7. NAMESPACE and NAMESPACENODE

The NAMESPACE element is used to define a Namespace. It is a recursive definition in order to allow nested namespace definitions. Each component of the full namespace path is described by a NAMESPACENODE element.

<!ELEMENT NAMESPACE (NAMESPACENODE,NAMESPACE?)>
<!ELEMENT NAMESPACENODE (%CIMIdentifier;)>
3.2.8. CLASS

The CLASS element defines a single (non-Association) CIM Class.

<!ELEMENT CLASS (CLASSPATH,SUPERCLASS?,(QUALIFIER|%Property;|METHOD)*)>

The SUPERCLASS subelement, if present, defines the name of the superclass of this class. If absent, it should be inferred that the class in question is a base class.

3.2.9. CLASSPATH

The CLASSPATH element defines the location of a CIM Class. It is formed from a namespace and Class name.

<!ELEMENT CLASSPATH (NAMESPACEPATH,CLASSNAME>
3.2.10. CLASSNAME

The CLASSNAME element defines the name of a CIM Class. 

<!ELEMENT CLASSNAME (%CIMIdentifier;)>
3.2.11 SUPERCLASS

The SUPERCLASS element defines the name of the CIM superclass of a CIM class.

<!ELEMENT SUPERCLASS (%CIMIdentifier;)>
3.2.12 QUALIFIER

The QUALIFIER element defines a single CIM Qualifier. If the Qualifier has a non-array type, it contains a single VALUE element representing the value of the Qualifier.  If the Qualifier has an array type, it contains one or more VALUE.INDEXED elements to represent its value.

<!ELEMENT QUALIFIER (VALUE|VALUE.INDEXED+)>
<!ATTLIST QUALIFIER
                       NAME              CDATA             #REQUIRED
                       TYPE              (
%CIMType;)       #REQUIRED
                      
%Local;
                      
%QualifierFlavor;>

The NAME Attribute defines the name of the Qualifier, and the TYPE defines the CIM Type.

3.2.13. PROPERTY

The PROPERTY element defines a single (non-array) CIM Property that is not a reference. It may contain a single VALUE element representing the value of the Property.

CIM Reference Properties are described using the REFERENCE element.

<!ELEMENT PROPERTY (QUALIFIER*,(VALUE)?)>
<!ATTLIST PROPERTY
                      NAME        CDATA            #REQUIRED
                      TYPE        (
%CIMType;) #REQUIRED
                     
%Origin;
              %Local;>

The NAME Attribute defines the name of the Property, and the TYPE defines the CIM Type.

3.2.14. PROPERTY.ARRAY

The PROPERTY.ARRAY element defines a single CIM Property with an array type. It contains zero or more VALUE.INDEXED elements representing the values of each array member of the Property value.

<!ELEMENT PROPERTY.ARRAY (ARRAYSIZE,QUALIFIER*,VALUE.INDEXED*)>
<!ATTLIST PROPERTY.ARRAY
                      NAME     CDATA            #REQUIRED
                      TYPE     (
%CIMType; ) #REQUIRED
                     
%Origin;
                  %Local;>

The NAME Attribute defines the name of the Property, and the TYPE defines the CIM Type.

The ARRAYSIZE subelement defines the size of the array in the case that it is constrained to a fixed number of elements. If it has no content within a CLASS element, this indicates that the array is of variable size. If it has no content within an INSTANCE element, it should not be inferred that the property is a variable-size array (i.e. the CLASS definition is always authoritative in this respect).

3.2.15. ARRAYSIZE

The ARRAYSIZE element defines the size of a fixed length array-valued property or method parameter.  The content of this element must be a positive integer, or empty.  If empty, this should be taken to infer that no array size information is being provided.

<!ELEMENT ARRAYSIZE (#PCDATA)>
3.2.16. METHOD

The METHOD element defines a single CIM Method. It may have Qualifiers, and zero or more parameters.  The order of the METHODPARAMETER subelements is significant as it should reflect the calling order to the Method.

<!ELEMENT METHOD (QUALIFIER*,METHODPARAMETER*)>
<!ATTLIST METHOD
                      NAME      CDATA                 #REQUIRED
                      TYPE      (void|
%CIMType; ) #REQUIRED
                     
%Origin;>

The NAME Attribute defines the name of the Method. The TYPE attribute defines the method return type, which is either any valid (non-reference) property type or void (to indicate that the method does not have a return type).

3.2.17. METHODPARAMETER

The METHODPARAMETER element defines a single parameter to a CIM Method.  Parameters are classified by whether they are references, arrays or simple types. A Parameters may have 0 or more Qualifiers.

<!ELEMENT METHODPARAMETER (QUALIFIER*,(PARAMETER|PARAMETER.REFERENCE|PARAMETER.ARRAY))>
<!ATTLIST METHOD
                      NAME      CDATA              #REQUIRED >

The NAME Attribute defines the name of the Parameter.

3.2.18. PARAMETER

The PARAMETER element defines a single (non-array, non-reference) Parameter to a CIM Method.

<!ELEMENT PARAMETER EMPTY>
<!ATTLIST PARAMETER
                     TYPE (
%CIMType; ) #REQUIRED>

The TYPE Attribute defines the CIM type of the parameter.

3.2.19. PARAMETER.REFERENCE

The PARAMETER.REFERENCE element defines a single reference Parameter to a CIM Method.

<!ELEMENT PARAMETER.REFERENCE ( REFERENCECLASS)>

The REFERENCECLASS subelement defines the strong type of the reference.

3.2.20. REFERENCECLASS

The REFERENCECLASS element defines the strong type of a reference for PARAMETER.REFERENCE or REFERENCE elements.

<!ELEMENT REFERENCECLASS  (%CIMIdentifier;)>
3.2.21. PARAMETER.ARRAY

The PARAMETER.ARRAY element defines a single Parameter to a CIM Method that has an array type.

<!ELEMENT PARAMETER.ARRAY ( ARRAYSIZE)>
<!ATTLIST PARAMETER.ARRAY
                    TYPE (
%CIMType; ) #REQUIRED>

The TYPE Attribute defines the CIM type of the parameter.

The ARRAYSIZE subelement has non-empty content if and only if the array is constrained to a fixed number of elements. If it has empty content this indicates that the array is of variable size. 

3.2.22. INSTANCE

The INSTANCE element defines a single CIM Instance of a (non-Association) CIM Class.

<!ELEMENT INSTANCE (INSTANCEPATH,(QUALIFIER|%Property;)*)>
3.2.23. INSTANCEPATH

The INSTANCEPATH element defines the location of a CIM Instance. It is formed from a namespace and Class name. It is comprised of a Namespace, a class name and a set of Key Bindings. If there are no key-bindings specified, the instance is assumed to be a singleton instance of a keyless class.

<!ELEMENT INSTANCEPATH (NAMESPACEPATH,CLASSNAME,KEYBINDING*)>
3.2.24. KEYBINDING

The KEYBINDING element defines a single property key property value binding. Note that this information may duplicate information held in the properties described as part of the instance, but is included here both for convenience and in the event that not all key property values are present in the INSTANCE.

<!ELEMENT KEYBINDING (KEYNAME,KEYVALUE)>
3.2.25. KEYNAME

The KEYNAME element defines a single property key name.

<!ELEMENT KEYNAME (%CIMIdentifier;)>
3.2.26. KEYVALUE

The KEYVALUE element defines a single property key value.   If the key property in question is a non-reference type, the VALUE element is used.  If the key property is a reference type, the CLASSPATH or INSTANCEPATH element is used.

<!ELEMENT KEYVALUE (VALUE|VALUE.REFERENCE)>
3.2.27. ASSOCIATION.CLASS

The ASSOCIATION.CLASS element defines a single CIM Association Class. This is modeled separately from a non-Association Class so that the features of XML Linking [4] can be used to identify linking elements within the XML Document, thereby surfacing CIM Associations in a natural manner native to XML.

The ASSOCIATION.CLASS element is defined as an extended inline link in the terminology of XML Linking, with the locator elements defined from the reference properties of the association.

Note that CIM mandates that an Association must have at least two references, and that references can only be used in the context of Associations.

<!ELEMENT ASSOCIATION.CLASS(CLASSPATH,SUPERCLASS?,REFERENCE+,
                                (
QUALIFIER|%Property;|METHOD)*)>
<!ATTLIST ASSOCIATION.CLASS
                    xml:link      CDATA        #FIXED "extended"
                    inline        (true|false) #FIXED "true"
                    role          CDATA        #IMPLIED
                    content-role  CDATA        #IMPLIED
                    content-title CDATA        #IMPLIED>
3.2.28. ASSOCIATION.INSTANCE

The ASSOCIATION.INSTANCE element defines a single Instance of a CIM Association Class. This is modeled separately from a non-Association Instance so that the features of XML Linking [4] can be used to identify linking elements within the XML Document, thereby surfacing CIM Associations in a natural manner native to XML.

The ASSOCIATION.INSTANCE element is defined as an extended inline link in the terminology of XML Linking, with the locator elements defined from the reference properties of the association.

Note that CIM mandates that an Association must have at least two references, and that references can only be used in the context of Associations.

<!ELEMENT ASSOCIATION.INSTANCE (INSTANCEPATH,REFERENCE+,
                                (
QUALIFIER|%Property;|METHOD)*)>
<!ATTLIST ASSOCIATION.INSTANCE
                    xml:link      CDATA        #FIXED "extended"
                    inline        (true|false) #FIXED "true"
                    role          CDATA        #IMPLIED
                    content-role  CDATA        #IMPLIED
                    content-title CDATA        #IMPLIED>

All Attributes of this element are as defined in the XML Linking Specification. The inline Attribute is fixed as true because in CIM the Association is regarded as participating in the relationship between the associated elements; in XML Linking parlance this means the contents of the Association class can be regarded as a local resource of the link.

The role Attribute can be used to describe the semantics of the Extended Link, and is not restricted by this specification.

The content-role and content-title Attributes can be used to describe the role of the local resource, and are not restricted by this specification.

3.2.29. REFERENCE

The REFERENCE element models a single CIM Property with reference semantics. This element is defined in XML Linking [4] parlance as a Locator for an extended link.

<!ELEMENT REFERENCE (REFERENCECLASS,QUALIFIER*,VALUE.REFERENCE?)>
<!ATTLIST REFERENCE
                   %Origin;
                   %Local;
                   xml:link   CDATA               #FIXED "locator"
                   href       CDATA               #IMPLIED
                   role       CDATA               #REQUIRED
                   title      CDATA               #IMPLIED
                   show       (embed|replace|new) #IMPLIED
                   actuate    (auto|user)         #IMPLIED
                   behavior   CDATA               #IMPLIED>

The REFERENCECLASS subelement defines the strong type of the reference.

The Origin and Local entities are used in the same manner as for other CIM Properties.

All other Attributes of this element are as defined in the XML Linking Specification [4].

The role Attribute is set from the CIM Property Name, as the semantics of a CIM Reference Property name are very similar to that of a role in an extended link locator.

The href Attribute identifies the participating resource. In mapping from CIM this is equivalent to the concept of an Object Path that has been re-expressed in a URL form suitable for navigation to an XML-enabled Browser. Although outside the scope of this document, it is evident that this should be defined by a mapping of CIM Object Paths to some form of URLs (for example, HTTP). It should be noted however that any quote (") characters in this attribute value must be replaced by the standard &quot; entity

As href is an Attribute it is not possible to provide further structure (using INSTANCEPATH or CLASSPATH) for this value. Hence the value is replicated (with structure) in the INSTANCEPATH or CLASSPATH element that is a child of the VALUE.REFERENCE subelement.

If the REFERENCE has no assigned value, then the href attribute should be omitted and there should be no VALUE.REFERENCE subelement.

The remaining Attributes are not restricted by this specification.

Back to contents

4. References

  1. "Common Information Model (CIM) Specification", Version 2.0, Desktop Management Task Force  3rd March 1998 (http://dmtf.org/cim/cimdoc20.doc)
  2. "Extensible Markup Language (XML)", Version 1.0, W3C Recommendation (http://www.w3.org/TR/REC-xml)
  3. "Namespaces in XML", 27th March 1998, W3C Working Draft (http://www.w3.org/TR/WD-xml-names)
  4. "XML Linking Language (XLink)", 3rd March 1998, W3C Working Draft (http://www.w3.org/TR/WD-xlink)
  5. "XML as a Representation for Management Information - A White Paper", Roger Booth, Microsoft Corporation, 1998 (http://wbem.freerange.com/wbem/xml_whitepaper.doc)
  6. "Cascading Style Sheets, Level 1", W3C Recommendation 17th December 1996 (http://www.w3.org/TR/REC-CSS1)
  7. "Cascading Style Sheets, Level 2", W3C Recommendation 12th May 1998 (http://www.w3.org/TR/REC-CSS2)
  8. "A Proposal for XSL", W3C Submission 27th August 1997 (http://www.w3.org/TR/NOTE-XSL.html)
  9. "Document Object Model", W3C Activity Statement June 15th 1998 (http://www.w3.org/DOM/)

Back to contents