<?xml version="1.0" encoding="UTF-8"?>
<!--
	Mobile Broadcast Services - InteractivityMedia Document
		version 	- 1.0
		date    	- 10 Oct 2008

    FILE INFORMATION

	OMA Permanent Document
	   File: OMA-SUP-XSD_bcast_si_interactivitymedia-V1_0-20081010-C
	   Type: Text - Schema Description

	Public Reachable Information
	   Path: http://www.openmobilealliance.org/tech/profiles
	   Name: bcast_si_interactivitymedia-v1_0.xsd

    NORMATIVE INFORMATION

	Information about this file can be found in the specification
	    OMA-TS-BCAST_Services-V1_0
	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

	You may use this document or any part of the document for internal
	or educational purposes only, provided you do not modify, edit or
	take out of context the information in this document in any manner.
	Information contained in this document may be used, at your sole
	risk, for any purposes.

	You may not use this document in any other manner without the prior
	written permission of the Open Mobile Alliance.  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 2008 Open Mobile Alliance Ltd.  All Rights Reserved.
	Used with the permission of the Open Mobile Alliance Ltd. under the
	terms set forth above.
-->
<!--
	CHANGE HISTORY

	20061214 	File created
	20061222	OMA-BCAST-2006-1081R02 implemented 
	20070404 	made consistent with OMA-TS-BCAST_Services-V1_0-20070403-D after followup consistency review (plus a few clerical changes). 
	20070410 	CR BCAST-2007-0442 implemented 
					to make consistent with OMA-TS-BCAST_Services-V1_0-20070406-D after followup consistency review 
	20070424 	Version to enter Candidate approval. 
					CR BCAST-2007-0442R01 implemented to make consistent with OMA-TS-BCAST_Services-V1_0-20070423-D
	20070808 	Fixed cardinality of xml:lang (now optional as in SG fragments). 
			Schema consistent with OMA-TS-BCAST_Services-V1_0-20070727-C 
	20071220	Made schema consistent with OMA-TS-BCAST_Services-V1_0-20071218-D 
	20080226           Re-publication - aligned with OMA-TS-BCAST_Services-V1_0-20080226-C
	20080722           Aligned with OMA-TS-BCAST_Services-V1_0-20080722-D
	20080807	Clerical: renamed to Candidate version.
	20080923           Aligned with OMA-TS-BCAST_Services-V1_0-20080922-D
-->
<xs:schema targetNamespace="urn:oma:xml:bcast:si:interactivitymedia:1.0" xmlns="urn:oma:xml:bcast:si:interactivitymedia:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!-- Importing xml default declarations (like xml:lang and xml:space) -->
	<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
	<!--
		==================================================
		InteractivityMediaDocument request (only for interactive delivery)
		==================================================
	-->
	<xs:element name="InteractivityMediaDocumentRequest" type="InteractivityMediaDocumentRequestType"/>
	<xs:complexType name="InteractivityMediaDocumentRequestType">
		<xs:sequence>
			<xs:element name="UserID" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="type" type="UserIDTypeType" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="DeviceID" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="type" type="DeviceIDTypeType" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="GroupID" type="xs:anyURI"/>
		</xs:sequence>
		<xs:attribute name="requestID" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!-- referenced range types -->
		<xs:simpleType name="ReservedProprietaryExtByteRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="128"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- 
		Specifies the type of Device ID.  
		0 - reserved for future use
		1 - IMEI [3GPP TS 23.003]
		2 - MEID [3GPP2 C.S0072]
		3-127 reserved for future use
		128-255 reserved for proprietary use  
	-->
	<xs:simpleType name="DeviceIDTypeType">
		<xs:union memberTypes="DeviceIDLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="DeviceIDLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="1"/>
			<xs:maxInclusive value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- 
		Specifies the type of User ID.  
		0 - username defined in [RFC 2865] 
		1 - IMSI
		2 - URI
		3 - IMPI
		4 - MSISDN
		5 - MIN 
		6-127 reserved for future use
		128-255 reserved for proprietary use
	-->
	<xs:simpleType name="UserIDTypeType">
		<xs:union memberTypes="UserIDLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="UserIDLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="5"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		==================================================
		InteractivityMediaDocument response (only for interactive delivery)
		==================================================
	-->
	<xs:element name="InteractivityMediaDocumentResponse" type="InteractivityMediaDocumentResponseType"/>
	<xs:complexType name="InteractivityMediaDocumentResponseType">
		<xs:sequence>
			<xs:element name="InteractivityMediaDocument" type="InteractivityMediaDocumentType"/>
		</xs:sequence>
		<xs:attribute name="requestID" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="statusCode" type="xs:unsignedByte" use="required"/>
	</xs:complexType>
	<!--
		==================================================
		InteractivityMediaDocument
		==================================================
	-->
	<xs:element name="InteractivityMediaDocument" type="InteractivityMediaDocumentType">
		<xs:annotation>
			<xs:documentation>
				An InteractivityMedia document triggers the Terminal to render
				the "interactivity media objects" message onto the GUI.
			</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="InteractivityMediaDocumentType">
		<xs:sequence>
			<xs:element name="MediaObjectGroup" type="MediaObjectGroupType" maxOccurs="unbounded"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="groupID" type="xs:anyURI" use="required"/>
		<xs:attribute name="groupPosition" type="xs:unsignedShort" use="required"/>
		<xs:attribute name="id" type="xs:anyURI" use="required"/>
		<xs:attribute name="version" type="xs:unsignedInt" use="required"/>
		<xs:attribute name="validFrom" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="validTo" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!--  MediaObjectGroup -->
	<xs:complexType name="MediaObjectGroupType">
		<xs:sequence>
			<xs:element name="ActionDescriptor" type="ActionDescriptorType" minOccurs="0"/>
			<xs:element name="BackOffTiming" type="BackOffTimingType" minOccurs="0"/>
			<xs:element name="MediaObjectSet" type="MediaObjectSetType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SMSTemplate" type="SMSTemplateType" minOccurs="0"/>
			<xs:element name="EmailTemplate" type="EmailTemplateType" minOccurs="0"/>
			<xs:element name="VoiceCall" type="VoiceCallType" minOccurs="0"/>
			<xs:element name="WebLink" type="WebLinkType" minOccurs="0"/>
			<xs:element name="AlternativeText" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:anyURI" use="required"/>
		<xs:attribute name="startMediaFlag" type="xs:boolean" use="required"/>
	</xs:complexType>
	<!--  Action Descriptor -->
	<xs:complexType name="ActionDescriptorType">
		<xs:attribute name="inputAllowedTime" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="onTimeOutPointer" type="xs:anyURI" use="optional"/>
		<xs:attribute name="updateFlag" type="xs:boolean" use="optional"/>
		<xs:attribute name="onActionPointer" type="xs:anyURI" use="optional"/>
	</xs:complexType>
	<!--  Back Off Timing -->
	<xs:complexType name="BackOffTimingType">
		<xs:attribute name="offsetTime" type="xs:decimal" use="required"/>
		<xs:attribute name="randomTime" type="xs:decimal" use="required"/>
	</xs:complexType>
	<!-- Media Object Set -->
	<xs:complexType name="MediaObjectSetType">
		<xs:sequence>
			<xs:element name="Description" type="xs:string" minOccurs="0"/>
			<xs:element name="Object" type="ObjectType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="File" type="FileType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="Content-Type" type="xs:string" use="required"/>
		<xs:attribute name="Content-Location" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!--  Object -->
	<xs:complexType name="ObjectType">
		<xs:sequence>
			<xs:element name="PartType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="Content-Location" type="xs:anyURI" use="optional"/>
		<xs:attribute name="Content-Type" type="xs:string" use="required"/>
		<xs:attribute name="start" type="xs:boolean" use="optional" default="false"/>
	</xs:complexType>
	<!--  File -->
	<xs:complexType name="FileType">
		<xs:attribute name="Content-Location" type="xs:anyURI" use="required"/>
		<xs:attribute name="TOI" type="xs:positiveInteger" use="required"/>
		<xs:attribute name="Content-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="Transfer-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="Content-Type" type="xs:string" use="optional"/>
		<xs:attribute name="Content-Encoding" type="xs:string" use="optional"/>
		<xs:attribute name="Content-MD5" type="xs:base64Binary" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Encoding-ID" type="xs:unsignedByte" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Instance-ID" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Maximum-Source-Block-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Encoding-Symbol-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Max-Number-of-Encoding-Symbols" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Scheme-Specific-Info" type="xs:base64Binary" use="optional"/>
	</xs:complexType>
	<!--  SMS Template -->
	<xs:complexType name="SMSTemplateType">
		<xs:sequence>
			<xs:element name="Description" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="LanguageString">
							<xs:attribute name="text" type="xs:string" use="optional"/>
						</xs:extension>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="SelectChoice" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="ChoiceText" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="smsURI" type="xs:anyURI" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!-- Email Template -->
	<xs:complexType name="EmailTemplateType">
		<xs:sequence>
			<xs:element name="Description" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="MessageBody" type="xs:base64Binary" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="toHeader" type="xs:string" use="required"/>
		<xs:attribute name="ccHeader" type="xs:string" use="optional"/>
		<xs:attribute name="bccHeader" type="xs:string" use="optional"/>
		<xs:attribute name="subjectHeader" type="xs:string" use="optional"/>
	</xs:complexType>
	<!-- Voice call -->
	<xs:complexType name="VoiceCallType">
		<xs:sequence>
			<xs:element name="Description" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="PhoneNumber" type="xs:anyURI" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!-- Web link -->
	<xs:complexType name="WebLinkType">
		<xs:sequence>
			<xs:element name="Description" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="webURL" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!-- Private Extensions -->
	<xs:complexType name="PrivateExtType">
		<xs:sequence>
			<xs:annotation>
				<xs:documentation>
					This container provides the place for proprietary and application-specific extensions. 
					Extensions SHALL use a different namespace.
				</xs:documentation>
			</xs:annotation>
			<xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- String with xml:lang attribute -->
	<xs:complexType name="LanguageString">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute ref="xml:lang" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:schema>
