<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="urn:3gpp:ns:mcdataInfo:1.0"
  xmlns:mcdatainfo="urn:3gpp:ns:mcdataInfo:1.0"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">

  <xs:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/TR/xmlenc-core/xenc-schema.xsd"/>

  <!-- root XML element -->
  <xs:element name="mcdatainfo" type="mcdatainfo:mcdatainfo-Type" id="info"/>

  <xs:complexType name="mcdatainfo-Type">
    <xs:sequence>
      <xs:element name="mcdata-Params" type="mcdatainfo:mcdata-ParamsType" minOccurs="0"/>
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="anyExt" type="mcdatainfo:anyExtType" minOccurs="0"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##any" processContents="lax"/>
  </xs:complexType> 

  <xs:complexType name="mcdata-ParamsType">
    <xs:sequence>
      <xs:element name="mcdata-access-token" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="request-type" type="xs:string" minOccurs="0"/>
      <xs:element name="mcdata-request-uri" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="mcdata-calling-user-id" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="mcdata-called-party-id" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="mcdata-calling-group-id" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="alert-ind" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="originated-by" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="mcdata-client-id" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:element name="mcdata-controller-psi" type="mcdatainfo:contentType" minOccurs="0"/>
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="anyExt" type="mcdatainfo:anyExtType" minOccurs="0"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##any" processContents="lax"/>
  </xs:complexType>

  <xs:simpleType name="protectionType">
    <xs:restriction base="xs:string">
       <xs:enumeration value="Normal"/>
       <xs:enumeration value="Encrypted"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="contentType">
    <xs:choice>
      <xs:element name="mcdataURI" type="xs:anyURI"/>
      <xs:element name="mcdataString" type="xs:string"/>
      <xs:element name="mcdataBoolean" type="xs:boolean"/>
      <xs:any namespace="##other" processContents="lax"/>
      <xs:element name="anyExt" type="mcdatainfo:anyExtType" minOccurs="0"/>
    </xs:choice>
    <xs:attribute name="type" type="mcdatainfo:protectionType"/>
    <xs:anyAttribute namespace="##any" processContents="lax"/>
  </xs:complexType>

  <xs:complexType name="anyExtType">
    <xs:sequence>
      <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>

