<?xml version="1.0" encoding="UTF-8"?>
<!--
Notice 
DSP8020.xsd
Document: Metric Registry XML Schema Specification
Version: 0.2.0
Status: Draft
Date: 11/16/2007
Author: Oliver Benke, Aaron E Merkin, Andy Maier, Karl Schopmeyer
Description: XML schema specification for standard metric registries.

Based on DSP0228.xsd by Steve Hand and Linda Martinez

Copyright © 2007 Distributed Management Task Force, Inc. (DMTF). All rights reserved. DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems management and interoperability. Members and non-members may reproduce DMTF specifications and documents for uses consistent with this purpose, provided that correct attribution is given. As DMTF specifications may be revised from time to time, the particular version and release date should always be noted. Implementation of certain elements of this standard or proposed standard may be subject to third party patent rights, including provisional patent rights (herein "patent rights"). DMTF makes no representations to users of the standard as to the existence of such rights, and is not responsible to recognize, disclose, or identify any or all such third party patent right, owners or claimants, nor for any incomplete or inaccurate identification or disclosure of such rights, owners or claimants. DMTF shall have no liability to any party, in any manner or circumstance, under any legal theory whatsoever, for failure to recognize, disclose, or identify any such third party patent rights, or for such party’s reliance on the standard or incorporation thereof in its product, protocols or testing procedures. DMTF shall have no liability to any party implementing such standard, whether such implementation is foreseeable or not, nor to any patent owner or claimant, and shall have no liability or responsibility for costs or losses incurred if a standard is withdrawn or modified after publication, and shall be indemnified and held harmless by any party implementing the standard from any and all claims of infringement by a patent owner for such implementations. For information about patents held by third-parties which have notified the DMTF that, in their opinion, such patent may relate to or impact implementations of DMTF standards, visit http://www.dmtf.org/about/policies/disclosures.php.

Change Requests: 
  None
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="DESCRIPTION" type="xs:string" nillable="false"/>
	<xs:element name="REGISTRY">
		<xs:annotation>
			<xs:documentation> A metric registry is a normative expression of the CIM BaseMetricDefinition instances.  A registry consists of a list of values for the properties which define metric CIM Instances. 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="REGISTRY_DECLARATION"/>
				<xs:element ref="REGISTRY_ENTRIES"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="REGISTRY_DECLARATION">
		<xs:annotation>
			<xs:documentation> List of details about the registry </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="IDENTIFICATION"/>
				<xs:element ref="SPECIFICATION" maxOccurs="unbounded"/>
				<xs:element ref="CIM_SCHEMA" minOccurs="0"/>
				<xs:element ref="OWNING_ENTITY"/>
				<xs:element ref="EDITOR" maxOccurs="unbounded"/>
				<xs:element ref="DESCRIPTION"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="IDENTIFICATION">
		<xs:annotation>
			<xs:documentation> The name and the version of the registry.  The name must be unique. </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="NAME" type="xs:string" use="required"/>
			<xs:attribute name="VERSION" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[0-9]*\.[0-9]*(\.[0-9]*)?([a-zA-Z])?"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="SPECIFICATION">
		<xs:annotation>
			<xs:documentation> The name and version of the specification document that the metric registry was created for</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="NAME" type="xs:string" use="required"/>
			<xs:attribute name="VERSION" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[0-9]*\.[0-9]*(\.[0-9]*)?([a-zA-Z])?"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="CIM_SCHEMA">
		<xs:annotation>
			<xs:documentation> The version of the cim schema that the registry is dependent on</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="VERSION" use="optional">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="[0-9]*\.[0-9]*(\.[0-9]*)?"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="OWNING_ENTITY">
		<xs:annotation>
			<xs:documentation>The name of the entity that maintains and owns the metric registry and the name of the group within the owning organization to contact about the metric registry. For registries owned by the DMTF, the NAME must be 'DMTF' and the CONTACT_GROUP shall be the name of the offical working group that has developed the registry. 
			</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="NAME" type="xs:string" use="required"/>
			<xs:attribute name="CONTACT_GROUP" type="xs:string" use="optional"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="EDITOR">
		<xs:annotation>
			<xs:documentation> The name, email, and organization of the message registry editor(s).</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="EMAIL" type="xs:string" use="required"/>
			<xs:attribute name="NAME" type="xs:string" use="required"/>
			<xs:attribute name="ORGANIZATION" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="REGISTRY_ENTRIES">
		<xs:annotation>
			<xs:documentation> The list of metrics defined in this registry, and the list of pre-defined statistics based on metrics. </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="METRIC" maxOccurs="unbounded"/>
				<xs:element ref="STATISTICS" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="METRIC">
		<xs:annotation>
			<xs:documentation> The normative expression of what property values the metric definition instance hasbv. </xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="METRICID"/>
				<xs:element ref="LOCALID"/>
				<xs:element ref="METRIC_DESCRIPTION"/>
				<xs:element ref="DATATYPE"/>
				<xs:element ref="CALCULABLE" minOccurs="0"/>
				<xs:element ref="UNITS"/>
				<xs:element ref="PROGRAMMATIC_UNITS"/>
				<xs:element ref="BREAKDOWN_DIMENSIONS" minOccurs="0"/>
				<xs:element ref="IS_CONTINUOUS"/>
				<xs:element ref="CHANGE_TYPE"/>
				<xs:element ref="TIMESCOPE"/>
				<xs:element ref="GATHERING_TYPE"/>
				<xs:element ref="SAMPLE_INTERVAL" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="STATISTICS">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="CLASSNAME"/>
				<xs:element ref="METRICID" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="CLASSNAME" type="xs:string"/>
	<xs:element name="METRICID" type="xs:string"/>
	<xs:element name="LOCALID" type="xs:string"/>
	<xs:element name="METRIC_DESCRIPTION" type="xs:string"/>
	<xs:element name="DATATYPE" type="xs:string"/>
	<xs:element name="CALCULABLE">
		<xs:simpleType>
			<xs:restriction base="xs:NMTOKEN">
				<xs:enumeration value="Non-calculable"/>
				<xs:enumeration value="Summable"/>
				<xs:enumeration value="Non-summable"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="UNITS" type="xs:string"/>
	<xs:element name="PROGRAMMATIC_UNITS" type="xs:string"/>
	<xs:element name="BREAKDOWN_DIMENSIONS" type="xs:string"/>
	<xs:element name="IS_CONTINUOUS" type="xs:boolean"/>
	<xs:element name="CHANGE_TYPE">
		<xs:simpleType>
			<xs:restriction base="xs:NMTOKEN">
				<xs:enumeration value="Unknown"/>
				<xs:enumeration value="NA"/>
				<xs:enumeration value="Counter"/>
				<xs:enumeration value="Gauge"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="TIMESCOPE">
		<xs:simpleType>
			<xs:restriction base="xs:NMTOKEN">
				<xs:enumeration value="Unknown"/>
				<xs:enumeration value="Point"/>
				<xs:enumeration value="Interval"/>
				<xs:enumeration value="StartupInterval"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="GATHERING_TYPE">
		<xs:simpleType>
			<xs:restriction base="xs:NMTOKEN">
				<xs:enumeration value="Unknown"/>
				<xs:enumeration value="OnChange"/>
				<xs:enumeration value="Periodic"/>
				<xs:enumeration value="OnRequest"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="SAMPLE_INTERVAL" type="xs:dateTime"/>
</xs:schema>
