﻿<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	Mobile Broadcast - Service Guide Backend Interfaces
		version 	- 1.0
		date    	- 10 Oct 2008

    FILE INFORMATION

	OMA Permanent Document
	   File: OMA-SUP-XSD_bcast_sg_backend-V1_0-20081010-C
	   Type: Text - Schema Description

	Public Reachable Information
	   Path: http://www.openmobilealliance.org/tech/profiles
	   Name: bcast_sg_backend-v1_0.xsd

    NORMATIVE INFORMATION

	Information about this file can be found in the specification
	    OMA-TS-BCAST_ServiceGuide-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
	
	20061006 	File created
	20061222	OMA-BCAST-2006-1081R02 implemented 
	20070205	CR OMA-BCAST-2007-0xxx-CR_Updates_to_SG_Backend_XML_Schema implemented
						- made consistent with OMA-TS-BCAST_Service_Guide-V1_0_0-20070104-D
						- added SGSRequest and SGSRRes messages
	20070403 	made consistent with OMA-TS-BCAST_Service_Guide-V1_0_0-20070329-D
	20070410 	CR BCAST-2007-0439 implemented to make consistent 
					with OMA-TS-BCAST_Service_Guide-V1_0_0-20070405-D after followup consistency review. 
	20070425	Version to enter Candidate approval. 
					Clerical: made naming consistent with OMNA rules
					Consistent with OMA-TS-BCAST_Service_Guide-V1_0-20070421-D
	20071220	 Made consistent with OMA-TS-BCAST_Service_Guide-V1_0-20071220-D
	20080226           Re-publication - aligned with OMA-TS-BCAST_Service-Guide-V1_0-20080226-C
	20080923           Aligned with OMA-TS-BCAST_Service-Guide-V1_0-20080912-D
-->
<xs:schema xmlns="urn:oma:xml:bcast:sg:backend:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sgdd="urn:oma:xml:bcast:sg:sgdd:1.0" xmlns:sg="urn:oma:xml:bcast:sg:fragments:1.0" targetNamespace="urn:oma:xml:bcast:sg:backend:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="urn:oma:xml:bcast:sg:fragments:1.0" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_fragments-v1_0.xsd"/>
	<xs:import namespace="urn:oma:xml:bcast:sg:sgdd:1.0" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_sgdd-v1_0.xsd"/>
	<!-- 
		==================================================
		Service Guide Delivery Message
		================================================== 
	-->
	<xs:element name="SGDelivery" type="SGDeliveryType"/>
	<xs:complexType name="SGDeliveryType">
		<xs:sequence>
			<xs:element name="BSMSelector" type="sgdd:BSMSelectorType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="BSMSelectorID" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SGData" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Body">
							<xs:complexType>
								<xs:choice>
									<xs:element name="PurchaseItem" type="sg:PurchaseItemType"/>
									<xs:element name="PurchaseData" type="sg:PurchaseDataType"/>
									<xs:element name="PurchaseChannel" type="sg:PurchaseChannelType"/>
								</xs:choice>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="id" type="xs:anyURI" use="optional"/>
					<xs:attribute name="transportID" type="xs:unsignedLong" use="optional"/>
					<xs:attribute name="version" type="xs:unsignedInt" use="required"/>
					<xs:attribute name="validFrom" type="xs:unsignedInt" use="required"/>
					<xs:attribute name="validTo" type="xs:unsignedInt" use="required"/>
					<xs:attribute name="encoding" type="EncodingRangeType" use="required"/>
					<xs:attribute name="type" type="FragmentTypeRangeType" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	Vaues for "encoding" attribute
	0 – XML encoded OMA BCAST Service Guide fragment 
	1 –127 Reserved for future use
	128-255 Reserved for proprietary use
-->
	<xs:simpleType name="EncodingRangeType">
		<xs:union memberTypes="EncodingLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="EncodingLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="0"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ReservedProprietaryExtByteRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="128"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
	Vaues for "type" attribute
	5 – PurchaseItem Fragment
	6 – PurchaseData Fragment
	7– PurchaseChannel Fragment
-->
	<xs:simpleType name="FragmentTypeRangeType">
		<xs:union memberTypes="FragmentTypeLRType"/>
	</xs:simpleType>
	<xs:simpleType name="FragmentTypeLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="5"/>
			<xs:maxInclusive value="7"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- 
		==================================================
		Service Guide Delivery Response Message
		================================================== 
	-->
	<xs:element name="SGDeliveryRes" type="SGDeliveryResType"/>
	<xs:complexType name="SGDeliveryResType">
		<xs:sequence>
			<xs:element name="SGDataResult" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="id" type="xs:anyURI" use="required"/>
					<xs:attribute name="statusCode" type="xs:unsignedByte" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
	</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>
	<!-- 
		==================================================
		Service Protection Information Request
		================================================== 
	-->
	<xs:element name="SGSPServiceInfo" type="SGSPServiceInfoType"/>
	<xs:complexType name="SGSPServiceInfoType">
		<xs:sequence>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="globalServiceID" type="xs:anyURI" use="optional"/>
		<xs:attribute name="globalContentID" type="xs:anyURI" use="optional"/>
	</xs:complexType>
	<!-- 
		==================================================
		Service Protection Information Response
		================================================== 
	-->
	<xs:element name="SGSPServiceInfoRes" type="SGSPServiceInfoResType"/>
	<xs:complexType name="SGSPServiceInfoResType">
		<xs:sequence>
			<xs:element name="ProtectionKeyID" minOccurs="0" maxOccurs="unbounded" type="sg:ProtectionKeyIDType"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="statusCode" type="xs:unsignedByte" use="required"/>
		<xs:attribute name="baseCID" type="xs:string" use="optional"/>
	</xs:complexType>
	<!-- 
		==================================================
		Service Protection Access Info Request
		================================================== 
	-->
	<xs:element name="SGSPAccessInfo" type="SGSPAccessInfoType"/>
	<xs:complexType name="SGSPAccessInfoType">
		<xs:sequence>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="globalServiceID" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!-- 
		==================================================
		Service Protection Access Info Response
		================================================== 
	-->
	<xs:element name="SGSPAccessInfoRes" type="SGSPAccessInfoResType"/>
	<xs:complexType name="SGSPAccessInfoResType">
		<xs:sequence>
			<xs:element name="KeyManagementSystem" type="sg:KeyManagementSystemType" minOccurs="0"/>
			<xs:element name="EncryptionType" type="sg:EncryptionTypeType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="statusCode" type="xs:unsignedByte" use="required"/>
	</xs:complexType>
	<!-- 
		==================================================
		Service Provisioning Information Request
		================================================== 
	-->
	<xs:element name="SGProvisioningInfo" type="SGProvisioningInfoType"/>
	<xs:complexType name="SGProvisioningInfoType">
		<xs:sequence>
			<xs:element name="GlobalServiceID" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="GlobalContentID" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<!-- 
		==================================================
		Service Provisioning Information Response
		================================================== 
	-->
	<xs:element name="SGProvisioningInfoRes" type="SGProvisioningInfoResType"/>
	<xs:complexType name="SGProvisioningInfoResType">
		<xs:sequence>
			<xs:element name="ProvisioningFragment" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:choice>
						<xs:element name="PurchaseItem" type="sg:PurchaseItemType"/>
						<xs:element name="PurchaseData" type="sg:PurchaseDataType"/>
						<xs:element name="PurchaseChannel" type="sg:PurchaseChannelType"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>
