<?xml version="1.0" encoding="UTF-8"?>

<!--

DS Syntax Schema - Device information schema for the DS enabler
   version - 2.0
   date    - 17 Jul 2011

FILE INFORMATION

  OMA Permanent Document
    File: OMA-SUP-XSD_DS_Syntax_Schema-V2_0-20110719-A
    Type: Text - Schema Description

  Public Reachable Information
    Path: http://www.openmobilealliance.org/tech/profiles
    Name: DS_Syntax_Schema-v2_0.xsd

NORMATIVE INFORMATION

  Information about this file can be found in the specification

    OMA-TS-DS_Syntax-V2_0-20110719-A

  available at http://www.openmobilealliance.org/

  Send comments to technical-comments@mail.openmobilealliance.org

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 2011 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 xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
	<xs:element name="Add" type="CommonOperationType"/>
	<xs:element name="Alert" type="AlertType"/>
	<xs:complexType name="AlertType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Item" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="Code" use="required"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="Anchor">
		<xs:complexType>
			<xs:attribute ref="Last" use="optional"/>
			<xs:attribute ref="Next" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="AnchorType">
		<xs:union memberTypes="xs:dateTime xs:positiveInteger"/>
	</xs:simpleType>
	<xs:attribute name="Atomic" type="xs:boolean" default="false"/>
	<xs:attribute name="AuthName" type="xs:string"/>
	<xs:attribute name="Behaviour">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="Preserve"/>
				<xs:enumeration value="Refresh"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
	<xs:element name="Chal" type="ChalType"/>
	<xs:complexType name="ChalType">
		<xs:sequence>
			<xs:element ref="Meta"/>
			<xs:element ref="NextNonce" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:attribute name="ChangeLogValidity" type="xs:boolean"/>
	<xs:element name="ClientURI" type="URIWithFPType"/>
	<xs:attribute name="Cmd">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="Add"/>
				<xs:enumeration value="Alert"/>
				<xs:enumeration value="Copy"/>
				<xs:enumeration value="Delete"/>
				<xs:enumeration value="Get"/>
				<xs:enumeration value="Move"/>
				<xs:enumeration value="Put"/>
				<xs:enumeration value="Replace"/>
				<xs:enumeration value="Results"/>
				<xs:enumeration value="Status"/>
				<xs:enumeration value="Sync"/>
				<xs:enumeration value="SyncAlert"/>
				<xs:enumeration value="SyncHdr"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
	<xs:attribute name="CmdID" type="xs:positiveInteger"/>
	<xs:attribute name="CmdRef" type="xs:nonNegativeInteger"/>
	<xs:attribute name="Code" type="xs:positiveInteger"/>
	<xs:complexType name="CommonOperationType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:element ref="Item" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="Copy" type="CommonOperationType"/>
	<xs:attribute name="Correlator" type="xs:string"/>
	<xs:element name="Cred" type="CredType"/>
	<xs:complexType name="CredType">
		<xs:sequence>
			<xs:element ref="Meta"/>
			<xs:element ref="Data"/>
		</xs:sequence>
		<xs:attribute ref="AuthName" use="optional"/>
	</xs:complexType>
	<xs:element name="Data" type="DataType"/>
	<xs:complexType name="DataType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute ref="Encrypted" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:element name="Delete" type="DeleteType"/>
	<xs:complexType name="DeleteType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Item" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="NoStatus" use="optional"/>
		<xs:attribute ref="SftDel" use="optional"/>
	</xs:complexType>
	<xs:attribute name="Direction">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="fromClient"/>
				<xs:enumeration value="fromServer"/>
				<xs:enumeration value="twoWay"/>
				<xs:enumeration value="NoWay"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
	<xs:complexType name="EmptyType"/>
	<xs:attribute name="Encrypted" type="xs:boolean" default="false"/>
	<xs:element name="EncryptedKey" type="CredType"/>
	<xs:element name="Field" type="FieldType"/>
	<xs:complexType name="FieldType">
		<xs:sequence>
			<xs:element ref="Item"/>
		</xs:sequence>
	</xs:complexType>
	<xs:attribute name="FieldLevel" type="xs:boolean" default="false"/>
	<xs:element name="Filter" type="FilterElementType"/>
	<xs:complexType name="FilterElementType">
		<xs:sequence>
			<xs:element ref="Meta"/>
			<xs:element ref="Field" minOccurs="0"/>
			<xs:element ref="Record" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="FilterType" use="optional"/>
	</xs:complexType>
	<xs:attribute name="FilterType" default="EXCLUSIVE">
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="EXCLUSIVE"/>
				<xs:enumeration value="INCLUSIVE"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:attribute>
	<xs:element name="Final" type="EmptyType"/>
	<xs:attribute name="Format" type="xs:string"/>
	<xs:attribute name="FP" type="xs:int"/>
	<xs:attribute name="FreeID" type="xs:unsignedInt"/>
	<xs:attribute name="FreeMem" type="xs:long"/>
	<xs:element name="Get" type="GetType"/>
	<xs:complexType name="GetType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:element ref="Item" maxOccurs="unbounded"/>
			<xs:element ref="Filter" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="ID" type="IDType"/>
	<xs:complexType name="IDType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute ref="FP" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:element name="IDContainer" type="IDContainerType"/>
	<xs:complexType name="IDContainerType">
		<xs:sequence>
			<xs:element ref="ID" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:attribute name="IDValidity" type="xs:boolean"/>
	<xs:element name="Item" type="ItemType"/>
	<xs:complexType name="ItemType">
		<xs:sequence>
			<xs:choice>
				<xs:element ref="TargetClientURI" minOccurs="0"/>
				<xs:element ref="TargetServerURI" minOccurs="0"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="SourceClientURI" minOccurs="0"/>
				<xs:element ref="SourceServerURI" minOccurs="0"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="TargetClientParentURI" minOccurs="0"/>
				<xs:element ref="TargetServerParentURI" minOccurs="0"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="SourceClientParentURI" minOccurs="0"/>
				<xs:element ref="SourceServerParentURI" minOccurs="0"/>
			</xs:choice>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:element ref="Data" minOccurs="0"/>
			<xs:element ref="MoreData" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:attribute name="Last" type="AnchorType"/>
	<xs:attribute name="MaxMsgSize" type="xs:long"/>
	<xs:attribute name="MaxObjSize" type="xs:unsignedLong"/>
	<xs:element name="Meta" type="MetaType"/>
	<xs:complexType name="MetaType">
		<xs:attribute ref="Format" use="optional"/>
		<xs:attribute ref="Type" use="required"/>
		<xs:attribute ref="Size" use="optional"/>
	</xs:complexType>
	<xs:element name="MoreData" type="EmptyType"/>
	<xs:element name="Move" type="CommonOperationType"/>
	<xs:attribute name="MsgID" type="xs:positiveInteger"/>
	<xs:attribute name="MsgRef" type="xs:positiveInteger"/>
	<xs:attribute name="Next" type="AnchorType"/>
	<xs:element name="NextNonce" type="xs:string"/>
	<xs:attribute name="NoStatus" type="xs:boolean" default="false"/>
	<xs:attribute name="NumberOfChanges" type="xs:unsignedInt"/>
	<xs:element name="Put" type="CommonOperationType"/>
	<xs:element name="Record" type="RecordType"/>
	<xs:complexType name="RecordType">
		<xs:sequence>
			<xs:element ref="Item"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="Replace" type="ReplaceType"/>
	<xs:complexType name="ReplaceType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:element ref="Item" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="FieldLevel" use="optional"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="RespURI" type="xs:anyURI"/>
	<xs:element name="Results" type="ResultsType"/>
	<xs:complexType name="ResultsType">
		<xs:sequence>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:element ref="Item" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="MsgRef" use="required"/>
		<xs:attribute ref="CmdRef" use="required"/>
	</xs:complexType>
	<xs:attribute name="Sequence" type="xs:boolean" default="false"/>
	<xs:element name="ServerURI" type="xs:anyURI"/>
	<xs:attribute name="SessionID" type="xs:unsignedInt"/>
	<xs:attribute name="SftDel" type="xs:boolean" default="false"/>
	<xs:attribute name="Size" type="xs:unsignedLong"/>
	<xs:element name="SourceClientURI" type="URIWithFPType"/>
	<xs:element name="SourceClientParentURI" type="xs:anyURI"/>
	<xs:element name="SourceServerURI" type="xs:anyURI"/>
	<xs:element name="SourceServerParentURI" type="xs:anyURI"/>
	<xs:element name="Status" type="StatusType"/>
	<xs:complexType name="StatusType">
		<xs:sequence>
			<xs:element ref="ServerURI" minOccurs="0"/>
			<xs:element ref="ClientURI" minOccurs="0"/>
			<xs:element ref="Anchor" minOccurs="0"/>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Chal" minOccurs="0"/>
			<xs:element ref="StatusItem" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="Item" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="MsgRef" use="required"/>
		<xs:attribute ref="CmdRef" use="required"/>
		<xs:attribute ref="Cmd" use="required"/>
		<xs:attribute ref="Code"/>
	</xs:complexType>
	<xs:element name="StatusItem" type="StatusItemType"/>
	<xs:complexType name="StatusItemType">
		<xs:sequence>
			<xs:element ref="ServerURI" minOccurs="0"/>
			<xs:element ref="ClientURI" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="Code" use="optional"/>
	</xs:complexType>
	<xs:element name="Sync" type="SyncCmdType"/>
	<xs:complexType name="SyncCmdType">
		<xs:sequence>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:choice>
				<xs:element ref="TargetClientURI" minOccurs="0"/>
				<xs:element ref="TargetServerURI" minOccurs="0"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="SourceClientURI" minOccurs="0"/>
				<xs:element ref="SourceServerURI" minOccurs="0"/>
			</xs:choice>
			<xs:element ref="Meta" minOccurs="0"/>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="Add"/>
				<xs:element ref="Copy"/>
				<xs:element ref="Delete"/>
				<xs:element ref="Move"/>
				<xs:element ref="Replace"/>
			</xs:choice>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="Atomic" use="optional"/>
		<xs:attribute ref="Sequence" use="optional"/>
		<xs:attribute ref="MaxObjSize" use="optional"/>
		<xs:attribute ref="NumberOfChanges" use="optional"/>
		<xs:attribute ref="FreeID" use="optional"/>
		<xs:attribute ref="FreeMem" use="optional"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="SyncAlert" type="SyncAlertType"/>
	<xs:complexType name="SyncAlertType">
		<xs:sequence>
			<xs:element ref="Anchor" />
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:choice>
				<xs:element ref="TargetClientURI"/>
				<xs:element ref="TargetServerURI"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="SourceClientURI"/>
				<xs:element ref="SourceServerURI"/>
			</xs:choice>
			<xs:element ref="SyncType"/>
			<xs:element ref="IDContainer" minOccurs="0"/>
			<xs:element ref="Filter" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="CmdID" use="required"/>
		<xs:attribute ref="MaxObjSize" use="optional"/>
		<xs:attribute ref="Correlator" use="optional"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="SyncBody" type="SyncBodyType"/>
	<xs:complexType name="SyncBodyType">
		<xs:sequence>
			<xs:choice maxOccurs="unbounded">
				<xs:element ref="Add"/>
				<xs:element ref="Alert"/>
				<xs:element ref="Copy"/>
				<xs:element ref="Delete"/>
				<xs:element ref="Get"/>
				<xs:element ref="Move"/>
				<xs:element ref="Put"/>
				<xs:element ref="Replace"/>
				<xs:element ref="Results"/>
				<xs:element ref="Status"/>
				<xs:element ref="Sync"/>
				<xs:element ref="SyncAlert"/>
			</xs:choice>
			<xs:element ref="Final" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="SyncML">
		<xs:annotation>
			<xs:documentation>Root</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="SyncHdr"/>
				<xs:element ref="SyncBody"/>
			</xs:sequence>
			<xs:attribute ref="Version" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="SyncHdr" type="SyncHdrType"/>
	<xs:complexType name="SyncHdrType">
		<xs:sequence>
			<xs:choice>
				<xs:element ref="TargetClientURI"/>
				<xs:element ref="TargetServerURI"/>
			</xs:choice>
			<xs:choice>
				<xs:element ref="SourceClientURI"/>
				<xs:element ref="SourceServerURI"/>
			</xs:choice>
			<xs:element ref="RespURI" minOccurs="0"/>
			<xs:element ref="Cred" minOccurs="0"/>
			<xs:element ref="Chal" minOccurs="0"/>
			<xs:element ref="EncryptedKey" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="SessionID" use="required"/>
		<xs:attribute ref="MsgID" use="required"/>
		<xs:attribute ref="MaxMsgSize" use="optional"/>
		<xs:attribute ref="NoStatus" use="optional"/>
	</xs:complexType>
	<xs:element name="SyncType" type="SyncTypeType"/>
	<xs:complexType name="SyncTypeType">
		<xs:attribute ref="Direction" use="required"/>
		<xs:attribute ref="Behaviour" use="required"/>
		<xs:attribute ref="IDValidity" use="optional" default="true"/>
		<xs:attribute ref="ChangeLogValidity" use="optional" default="true"/>
	</xs:complexType>
	<xs:element name="TargetClientURI" type="xs:anyURI"/>
	<xs:element name="TargetClientParentURI" type="xs:anyURI"/>
	<xs:element name="TargetServerURI" type="xs:anyURI"/>
	<xs:element name="TargetServerParentURI" type="xs:anyURI"/>
	<xs:attribute name="Type" type="xs:string"/>
	<xs:complexType name="URIWithFPType">
		<xs:simpleContent>
			<xs:extension base="xs:anyURI">
				<xs:attribute ref="FP" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:attribute name="Version" type="xs:string"/>
</xs:schema>
