<?xml version="1.0" encoding="UTF-8" ?>

	<!--
FILE INFORMATION

Description
   This schema provices the XML Schema for the MC enabler

Version: 1.0 (1.0.6)
Date:    11 June 2013

OMA Permanent Document
   File: OMA-SUP-XSD_MC-V1_0-20130611-A
   Type: Text
   
Public Reachable Information
   Path: http://www.openmobilealliance.org/tech/profiles
   Name: mc_xs-v1_0.xsd

NORMATIVE INFORMATION

Information about this file can be found in the latest revision of the specification
OMA-TS-MC-V1_0 

  This is available at http://www.openmobilealliance.org/

  Send comments to technical-comments@mail.openmobilealliance.org

CHANGE HISTORY

11062013  (Status changed to Approved by TP:TP ref#: OMA-TP-2013-0182-INP_MC_V1_0_for_final_Approval) 

	
LEGAL DISCLAIMER

  Use of this document is subject to all of the terms and conditions
  of the Use Agreement located at
  http://www.openmobilealliance.org/UseAgreement.html,
  provided, however, that section (d) under "Documents – Terms 
  of Use" which states, "no modifications are made to such 
  Documents" does not apply to your use.

  The Open Mobile Alliance authorizes you to copy this document, 
  provided that you retain all copyright and other proprietary  
  notices contained in the original materials on any copies of the 
  materials and  that you comply strictly with these terms. This 
  copyright permission does not constitute an endorsement of the 
  products or services. The Open Mobile Alliance assumes no 
  responsibility for errors or omissions in this document.


  Each Open Mobile Alliance member has agreed to use reasonable
  endeavors to inform the Open Mobile Alliance in a timely manner of
  Essential IPR as it becomes aware that the Essential IPR is related
  to the prepared or published specification.  However, the members
  do not have an obligation to conduct IPR searches.  The declared
  Essential IPR is publicly available to members and non-members of
  the Open Mobile Alliance and may be found on the "OMA IPR
  Declarations" list at http://www.openmobilealliance.org/ipr.html.
  The Open Mobile Alliance has not conducted an independent IPR review
  of this document and the information contained herein, and makes no
  representations or warranties regarding third party IPR, including
  without limitation patents, copyrights or trade secret rights.  This
  document may contain inventions for which you must obtain licenses
  from third parties before making, using or selling the inventions.
  Defined terms above are set forth in the schedule to the Open Mobile
  Alliance Application Form.

  NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
  MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
  OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
  IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
  COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
  NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.

  THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
  DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
  EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
  DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.

  Copyright 2010 Open Mobile Alliance Ltd.  All Rights Reserved.
  Used with the permission of the Open Mobile Alliance Ltd. under the
  terms set forth above.
-->

<xs:schema targetNamespace="http://www.openmobilealliance.com/oma-mc/1.0"
                  elementFormDefault="qualified"
                  xmlns="http://www.openmobilealliance.com/oma-mc/1.0"
                  xmlns:mc="http://www.openmobilealliance.com/oma-mc/1.0"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<!--
        =============================
            Referenced Simple Types
        =============================
    -->

	<!-- Transaction ID -->
	<xs:simpleType name="transactionid">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>

	<!-- Error Status -->
	<xs:simpleType name="status">
		<xs:restriction base="xs:string">
			<xs:enumeration value="MC_UNAUTHORISED" />
			<xs:enumeration value="MC_SERVICE_UNAVAILBLE" />
			<xs:enumeration value="MC_MISSING_PARAMS" />
			<xs:enumeration value="MC_INVALID_PARAMS" />
			<xs:enumeration value="MC_INVALID_ICI" />
			<xs:enumeration value="MC_INACTIVE_ICI" />
			<xs:enumeration value="MC_FRAUDULENT_ICI" />
			<xs:enumeration value="MC_CANNOT_RESOLVE_ICI" />
			<xs:enumeration value="MC_TOO_MANY_HOPS" />
			<xs:enumeration value="MC_CT_TOKEN_MISMATCH" />
			<xs:enumeration value="MC_CT_NOT_SUPPORTED" />
			<xs:enumeration value="MC_CT_NOT_AVAILABLE" />
			<xs:enumeration value="MC_CT_NOT_REQUESTED" />
		</xs:restriction>
	</xs:simpleType>

	<!-- Error Description -->
	<xs:simpleType name="description">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Address URL -->
	<xs:simpleType name="address">
		<xs:restriction base="xs:anyURI" />
	</xs:simpleType>

	<!-- Content Description -->
	<xs:simpleType name="contentdescription">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Tracking Indicator -->
	<xs:simpleType name="trackingindicator">
		<xs:restriction base="xs:boolean" />
	</xs:simpleType>

	<!-- Tracking Address -->
	<xs:simpleType name="trackingaddress">
		<xs:restriction base="xs:anyURI" />
	</xs:simpleType>

	<!-- Code Type -->
	<xs:simpleType name="codetype">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Code Title -->
	<xs:simpleType name="codetitle">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Indirect Code Identifier -->
	<xs:simpleType name="ici">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Enabler Version -->
	<xs:simpleType name="enablerversion">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Client ID -->
	<xs:simpleType name="clientid">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Application Name -->
	<xs:simpleType name="applicationname">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Opt Out -->
	<xs:simpleType name="optout">
		<xs:restriction base="xs:boolean" />
	</xs:simpleType>

	<!-- Action -->
	<xs:simpleType name="action">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Content Type -->
	<xs:simpleType name="contenttype">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Timestamp -->
	<xs:simpleType name="timestamp">
		<xs:restriction base="xs:dateTime" />
	</xs:simpleType>

	<!-- Usage Count -->
	<xs:simpleType name="usagecount">
		<xs:restriction base="xs:integer" />
	</xs:simpleType>

	<!-- Location Information -->
	<xs:simpleType name="locationinfo">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Network ID -->
	<xs:simpleType name="networkid">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Country Code -->
	<xs:simpleType name="countrycode">
		<xs:restriction base="xs:string" >
			<xs:length value="2"/>
		</xs:restriction>
	</xs:simpleType>
	
	<!-- Postal Code / Zip Code -->
	<xs:simpleType name="postalcode">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Age -->
	<xs:simpleType name="age">
		<xs:restriction base="xs:string" />
	</xs:simpleType>

	<!-- Income -->
	<xs:simpleType name="income">
		<xs:restriction base="xs:string" />
	</xs:simpleType>
	
	<!-- Gender -->
	<xs:simpleType name="gender">
		<xs:restriction base="xs:string" />
	</xs:simpleType>
	
	<!-- 
	   =============
		  Complex Types
	   =============
	   -->

	<xs:complexType name="codecontentset">
		<xs:sequence>
			<xs:element name="codecontent" type="mc:codecontent" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="codecontent">
		<xs:sequence>
			<xs:element name="type" type="mc:codetype"/>
			<xs:element name="title" type="mc:codetitle" minOccurs="0" maxOccurs="1"/>
			<xs:element name="contentelement" type="mc:contentelement" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="contentelement">
		<xs:sequence>
			<xs:any namespace="##any" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="usagestatistics">
		<xs:sequence>
			<xs:element name="appname" type="mc:applicationname" minOccurs="0" maxOccurs="1"/>
			<xs:element name="action" type="mc:action" minOccurs="0" maxOccurs="1"/>
			<xs:element name="timestamp" type="mc:timestamp" minOccurs="0" maxOccurs="1"/>
			<xs:element name="locationinfo" type="mc:locationinfo" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>

	<!-- 
	   =============
		  Messages
	   =============
	   -->
	<xs:complexType name="MC-ERROR">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid" minOccurs="0" maxOccurs="1"/>
			<xs:element name="status" type="mc:status" />
			<xs:element name="description" type="mc:description" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-1-RESOLVE_ICI_RESPONSE">
		<xs:sequence>
			<xs:element name="codecontentset" type="mc:codecontentset"/>
			<xs:element name="contentdescription" type="mc:contentdescription" minOccurs="0" maxOccurs="1"/>
			<xs:element name="trackingindicator" type="mc:trackingindicator"/>
			<xs:element name="trackingaddress" type="mc:trackingaddress" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-2-ROUTE_ICI_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
			<xs:element name="addr" type="mc:address"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-3-RESOLVE_ICI_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
			<xs:element name="codecontentset" type="mc:codecontentset"/>
			<xs:element name="contentdescription" type="mc:contentdescription" minOccurs="0" maxOccurs="1"/>
			<xs:element name="trackingaddress" type="mc:trackingaddress" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-4-TRACKING_REPORT">
		<xs:sequence>
			<xs:element name="ici" type="mc:ici"/>
			<xs:element name="enablerver" type="mc:enablerversion"/>
			<xs:element name="clientid" type="mc:clientid"/>
			<xs:element name="trackingaddress" type="mc:trackingaddress" minOccurs="0" maxOccurs="1"/>
			<xs:element name="usagestatistics" type="mc:usagestatistics" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="optout" type="mc:optout"/>
			<xs:element name="cc" type="mc:countrycode" minOccurs="0" maxOccurs="1"/>
			<xs:element name="post" type="mc:postalcode" minOccurs="0" maxOccurs="1"/>
			<xs:element name="age" type="mc:age" minOccurs="0" maxOccurs="1"/>
			<xs:element name="income" type="mc:income" minOccurs="0" maxOccurs="1"/>
			<xs:element name="gender" type="mc:gender" minOccurs="0" maxOccurs="1"/>
			<xs:element name="contenttype" type="mc:contenttype" minOccurs="0" maxOccurs="1"/>
			<xs:element name="usagecount" type="mc:usagecount" minOccurs="0" maxOccurs="1"/>
			<xs:element name="networkidhome" type="mc:networkid" minOccurs="0" maxOccurs="1"/>
			<xs:element name="networkidroam" type="mc:networkid" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-5-CODE_TRANSFER_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-5-TRANSFER_CONFIRMATION_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-6-CODE_TRANSFER_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-6-TRANSFER_CONFIRMATION_RESPONSE">
		<xs:sequence>
			<xs:element name="tid" type="mc:transactionid"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="MC-6-TRACKING_REPORT">
		<xs:sequence>
			<xs:element name="ici" type="mc:ici"/>
			<xs:element name="clientid" type="mc:clientid"/>
			<xs:element name="trackingaddress" type="mc:trackingaddress" minOccurs="0" maxOccurs="1"/>
			<xs:element name="usagestatistics" type="mc:usagestatistics" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="cc" type="mc:countrycode" minOccurs="0" maxOccurs="1"/>
			<xs:element name="post" type="mc:postalcode" minOccurs="0" maxOccurs="1"/>
			<xs:element name="age" type="mc:age" minOccurs="0" maxOccurs="1"/>
			<xs:element name="income" type="mc:income" minOccurs="0" maxOccurs="1"/>
			<xs:element name="gender" type="mc:gender" minOccurs="0" maxOccurs="1"/>
			<xs:element name="contenttype" type="mc:contenttype" minOccurs="0" maxOccurs="1"/>
			<xs:element name="usagecount" type="mc:usagecount" minOccurs="0" maxOccurs="1"/>
			<xs:element name="networkidhome" type="mc:networkid" minOccurs="0" maxOccurs="1"/>
			<xs:element name="networkidroam" type="mc:networkid" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>

	<!--
	   ================
		  MC Envelope
	   ================
	   -->
	<xs:element name="envelope">
		<xs:complexType>
			<xs:choice>
				<xs:element name="MC-ERROR" type="mc:MC-ERROR" />
				<xs:element name="MC-1-RESOLVE_ICI_RESPONSE" type="mc:MC-1-RESOLVE_ICI_RESPONSE" />
				<xs:element name="MC-2-ROUTE_ICI_RESPONSE" type="mc:MC-2-ROUTE_ICI_RESPONSE" />
				<xs:element name="MC-3-RESOLVE_ICI_RESPONSE" type="mc:MC-3-RESOLVE_ICI_RESPONSE" />
				<xs:element name="MC-4-TRACKING_REPORT" type="mc:MC-4-TRACKING_REPORT" />
				<xs:element name="MC-5-CODE_TRANSFER_RESPONSE" type="mc:MC-5-CODE_TRANSFER_RESPONSE" />
				<xs:element name="MC-6-CODE_TRANSFER_RESPONSE" type="mc:MC-6-CODE_TRANSFER_RESPONSE" />
				<xs:element name="MC-6-TRACKING_REPORT" type="mc:MC-6-TRACKING_REPORT" />
				<xs:element name="MC-5-TRANSFER_CONFIRMATION_RESPONSE" type="mc:MC-5-TRANSFER_CONFIRMATION_RESPONSE" />
				<xs:element name="MC-6-TRANSFER_CONFIRMATION_RESPONSE" type="mc:MC-6-TRANSFER_CONFIRMATION_RESPONSE" />
			</xs:choice>
		</xs:complexType>
	</xs:element>

</xs:schema>