|
CIM Tutorial
> WBEM > xmlCIM
 |
xmlCIM
|
 |
WBEM Operations
| xmlCIM | CIM-XML
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 structure of an XML Document.
The goal of xmlCIM is to create an XML grammar which can be written
in DTD (Document Type Definition), and can be used both to represent
CIM declarations (Classes, Instances and Qualifiers) and CIM Messages
for use by CIM protocols.
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:
- Fully standardized technologies are used wherever possible,
in preference to Working Drafts.
- Completeness is favored over conciseness (all aspects of CIM
should be modeled).
While the DMTF 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:
- XML documents conforming to this mapping that express CIM declarations
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 (Managed
Object Format) syntax.
- The mapping should be applicable to the wire-level representation
of CIM Messages defined by the CIM mapping onto HTTP.
There are two fundamentally different models for mapping CIM in
XML:
- A Schema Mapping is one in which the XML Schema is
used to describe the CIM classes, and CIM Instances are mapped
to valid XML Documents for that schema.
- A Metaschema Mapping is one in which the XML schema
is used to describe the CIM metaschema, and both CIM classes
and instances are valid XML documents for that schema.
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 was adopted here for the
following reasons:
- It only requires one standardized metaschema DTD for CIM,
rather than an unbounded number of DTDs. This considerably reduces
the complexity of management and administration of XML mappings.
- XML DTD does not allow an unordered list of elements. In a
static mapping this would mean either:
- Fixing an arbitrary order for property, method and qualifier
lists (making it harder for a receiving application to process),
or;
- Defining a very unwieldy mapping which took account of all
list orderings explicitly (and whose size would grow exponentially
with the number of list elements).
- In a schema mapping, the names of CIM Schema elements (class,
property, qualifier and method names) populate the XML element
namespace. In order to replicate the scoping rules on CIM element
names within XML DTD, it would be necessary to employ XML Namespaces
to define XML Schema to per-property level of granularity. This
would be extremely cumbersome to administer and process. A metaschema
mapping only introduces a small, fixed number of terms into
the XML element namespace (such as "Class", "Instance",
"Property", and so forth). As an alternative to the
introduction of additional XML Namespaces, some renaming of
CIM elements could be used (for example, prefixing a qualifier
name with the name of its owning property and its owning class),
but this would result in XML documents that were verbose and
difficult to understand.
- Although a schema mapping could allow XML-based validation
of instances against classes, this would only be possible if
the entire class hierarchy were flattened prior to mapping the
CIM Class to an XML Schema. If this flattening were not performed
then inherited properties may be absent from the DTD, which
would cause validation to fail against an instance that included
the value of an inherited property.
The subset of the DTD for CIM presented in WBEM is concerned with
object declarations, and is intended to allow expression of CIM
objects in XML sufficient for rendering into a number of formats,
of which MOF is one.
The semantic content of a MOF file is fully captured by the DTD
presented herein, so that it is possible to express any MOF conformant
to in an equivalent XML representation using this DTD. This includes
the ability to express any of the standard MOF pragmas defined in,
with the exception of the locale and instancelocale pragmas.
|