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

	Description
		BCAST enabler - Service Guide Delivery Descriptor

	Version: 1.2
	Date:    14 Jan 2014

	OMA Permanent Document
		File: OMA-SUP-XSD_bcast_sg_sgdd-V1_2-20140114-C
		Type: Text

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

	NORMATIVE INFORMATION

	Information about this file can be found in the latest revision of
	the specification OMA-TS-BCAST_ServiceGuide-V1_2 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 2014 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

	19122012	* File created from OMA-SUP-XSD_bcast_sg_sgdd-V1_1-20100914-C.xsd:
				  - embedded file information header aligned with
				    http://member.openmobilealliance.org/ftp/rel/gen_info/Procs/SupportFiles_XSD-v1_0.shtml
				  - minor version of target namespace increased to 1.2
				* Alignment with OMA-TS-BCAST_ServiceGuide-V1_2_0-20121203-D, 
				and OMA-TS-BCAST_DVB_NGH_Adaptation-V1_2_0-20120830-D with the ,
				  following CR implemented:
				  - OMA-BCAST-2012-0074-CR_DVB_NGH_Adaptation
	21082013	* correction of ServiceGuideDeliveryDescriptor element to add the TerminalCapability element that was missing.
	10122013	* consistency review: resolution of comments: 
					-XF001 (update the BDSSpecificEntryPointInfo for DVB-NGH and T2) 
					-and XF002 (delete the slash in <xs:element name="StaticChain" /> and add a closing tag </xs:element> after the complex type.)
	14012014 Status changed to Candidate by TP, TP Ref # OMA-TP-2014-0002-INP_BCAST_NGH_V1_2_ERP_and_ETR_for_Candidate_approval				

-->
<xs:schema
	targetNamespace="urn:oma:xml:bcast:sg:sgdd:1.2"
	xmlns="urn:oma:xml:bcast:sg:sgdd:1.2"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:sg="urn:oma:xml:bcast:sg:fragments:1.2"
	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"/>
	<!-- Importing referenced BCAST namespaces -->
	<xs:import namespace="urn:oma:xml:bcast:sg:fragments:1.2" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_fragments-v1_2.xsd"/>
	<!--
	======================================
	Service Guide Delivery Descriptor
	=======================================
	-->
	<xs:element name="ServiceGuideDeliveryDescriptor" type="ServiceGuideDeliveryDescriptorType"/>
	<xs:complexType name="ServiceGuideDeliveryDescriptorType">
		<xs:sequence>
			<xs:element name="NotificationReception" type="NotificationReceptionType" minOccurs="0"/>
			<xs:element name="BSMList" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="BSMSelector" type="BSMSelectorType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DescriptorEntry" type="DescriptorEntryType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="TerminalCapability" type="TerminalCapabilityType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SGEntryPoints" type="SGEntryPointsType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="RMS" type="RMSType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="AudienceMeasurement" type="AudienceMeasurementType" minOccurs="0"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:anyURI" use="optional"/>
		<xs:attribute name="version" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<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>
	<!--
	======================================
	NotificationReception sub-type
	=======================================
	-->
	<xs:complexType name="NotificationReceptionType">
		<!--
		 this construct implements the constraint:
		"at least one of the elements <IPBroadcastDelivery> or <PollURL> SHALL be present."
		-->
		<xs:sequence>
			<xs:choice>
				<xs:sequence>
					<xs:element name="IPBroadcastDelivery">
						<xs:complexType>
							<xs:attribute name="port" type="xs:unsignedInt" use="required"/>
							<xs:attribute name="address" type="xs:string" use="required"/>
						</xs:complexType>
					</xs:element>
					<xs:element name="PollURL" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:element name="PollURL" type="xs:anyURI" maxOccurs="unbounded"/>
			</xs:choice>
			<xs:element name="PollPeriod" minOccurs="0" type="xs:decimal"/>
		</xs:sequence>
	</xs:complexType>
	<!--
	======================================
	BSMSelector sub-type
	=======================================
	-->
	<!--
		The type of bsmFilterCode.
		1 - BSMCode (Smart Card Code)
		This is used if the determination is made based on the country and operator code in the (U)SIM/(R-)UIM/CSIM
		2 - BSMCode (Non Smart Card Code):
		This is used if the determination is made based on the country and operator code in the terminal
		Other values are reserved.
	-->
	<xs:simpleType name="BFCRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="1"/>
			<xs:maxInclusive value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Digit2Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{2}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Digit3Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{3}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Digit4Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{4}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Digit8Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{8}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="Digit23Type">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{2}[0-9]?"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="BSMFilterCodeType">
		<xs:choice minOccurs="0">
			<xs:element name="NetworkCode3GPP">
				<xs:complexType>
					<xs:attribute name="mobileCountryCode" type="Digit3Type" use="optional"/>
					<xs:attribute name="mobileNetworkCode" type="Digit23Type" use="optional"/>
					<xs:attribute name="networkSubsetCode" type="Digit2Type" use="optional"/>
					<xs:attribute name="networkSubsetCodeRangeStart" type="Digit2Type" use="optional"/>
					<xs:attribute name="networkSubsetCodeRangeEnd" type="Digit2Type" use="optional"/>
					<xs:attribute name="codeRangeStart" type="Digit8Type" use="optional"/>
					<xs:attribute name="codeRangeEnd" type="Digit8Type" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="NetworkCode3GPP2">
				<xs:complexType>
					<xs:attribute name="mobileCountryCode" type="Digit3Type" use="optional"/>
					<xs:attribute name="mobileNetworkCode" type="Digit23Type" use="optional"/>
					<xs:attribute name="iRMBasedMIN" type="Digit4Type" use="optional"/>
					<xs:attribute name="hRPDRealm" type="xs:integer" use="optional"/>
					<xs:attribute name="ruimCSIMCodeRangeStart" type="xs:string" use="optional"/>
					<xs:attribute name="ruimCSIMCodeRangeEnd" type="xs:string" use="optional"/>
				</xs:complexType>
			</xs:element>
		</xs:choice>
		<xs:attribute name="type" type="BFCRangeType" use="required"/>
		<xs:attribute name="serviceProviderCode" type="xs:unsignedByte" use="optional"/>
		<xs:attribute name="corporateCode" type="xs:unsignedByte" use="optional"/>
		<xs:attribute name="serviceProviderName" type="xs:string" use="optional"/>
		<xs:attribute name="nonSmartCardCode" type="xs:string" use="optional"/>
	</xs:complexType>
	<xs:complexType name="BSMSelectorType">
		<xs:sequence>
			<xs:element name="BSMFilterCode" type="BSMFilterCodeType" minOccurs="0"/>
			<xs:element name="Name" type="LanguageString" maxOccurs="unbounded"/>
			<xs:element name="RoamingRule" type="RoamingRuleType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="NotificationReception" type="NotificationReceptionType" minOccurs="0" />
		</xs:sequence>
		<xs:attribute name="id" type="xs:anyURI" use="required"/>
		<xs:attribute name="roamingRuleRequestAddress" type="xs:anyURI" use="optional"/>
	</xs:complexType>
	<xs:complexType name="LanguageString">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute ref="xml:lang" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<!--
	======================================
	Roaming Rule sub-type
	======================================
	-->
	<xs:element name="RoamingRule" type="RoamingRuleType"/>
	<xs:complexType name="RoamingRuleType">
		<xs:sequence>
			<xs:element name="TimeFrame" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="startTime" type="xs:unsignedInt" use="optional"/>
					<xs:attribute name="endTime" type="xs:unsignedInt" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="AllowPurchaseItem" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="AllowPurchaseData" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="AllowService" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="AllowContent" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DenyPurchaseItem" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DenyPurchaseData" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DenyService" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="DenyContent" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Id" type="xs:anyURI" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="allowAll" type="xs:boolean" use="optional" default="false"/>
		<xs:attribute name="denyAll" type="xs:boolean" use="optional" default="false"/>
	</xs:complexType>
	<!--
	======================================
	DescriptorEntry sub-type
	=======================================
	-->
	<xs:complexType name="DescriptorEntryType">
		<xs:sequence>
			<xs:element name="GroupingCriteria" type="GroupingCriteriaType" minOccurs="0"/>
			<xs:element name="Transport" type="TransportType" minOccurs="0"/>
			<xs:element name="AlternativeAccessURL" type="xs:anyURI" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="ServiceGuideDeliveryUnit" type="ServiceGuideDeliveryUnitType"
				maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="type" type="DescriptorEntryTypeRangeType" use="optional" default="0"/>
	</xs:complexType>
	<xs:complexType name="GroupingCriteriaType">
		<xs:sequence>
			<xs:element name="TimeGroupingCriteria" type="TimeGroupingCriteriaType" minOccurs="0"/>
			<xs:element name="GenreGroupingCriteria" type="GenreType" minOccurs="0"/>
			<xs:element name="BSMSelector" type="BSMSelectorIDRefType" minOccurs="0"
				maxOccurs="unbounded"/>
			<xs:element name="ServiceCriteria" type="xs:anyURI" minOccurs="0"/>
			<xs:element name="TerminalCapabilityCriteria" type="TerminalCapabilityCriteriaType" minOccurs="0"
				maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TimeGroupingCriteriaType">
		<xs:attribute name="startTime" type="xs:unsignedInt" use="required"/>
		<xs:attribute name="endTime" type="xs:unsignedInt" use="required"/>
	</xs:complexType>
	<xs:complexType name="BSMSelectorIDRefType">
		<xs:attribute name="idRef" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<xs:complexType name="TerminalCapabilityCriteriaType">
		<xs:attribute name="idRef" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!-- Genre -->
	<xs:simpleType name="GenreTypeType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="main"/>
			<xs:enumeration value="secondary"/>
			<xs:enumeration value="other"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="GenreType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="type" type="GenreTypeType" use="optional"/>
				<xs:attribute name="href" type="xs:anyURI" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="TransportType">
		<xs:attribute name="ipAddress" type="xs:string" use="required"/>
		<xs:attribute name="port" type="xs:unsignedShort" use="required"/>
		<xs:attribute name="srcIpAddress" type="xs:string" use="optional"/>
		<xs:attribute name="transmissionSessionID" type="xs:unsignedShort" use="required"/>
		<xs:attribute name="hasFDT" type="xs:boolean" default="true" use="optional"/>
	</xs:complexType>
	<xs:complexType name="ServiceGuideDeliveryUnitType">
		<xs:sequence>
			<xs:element name="Fragment" type="FragmentType" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="transportObjectID" type="xs:positiveInteger" use="optional"/>
		<xs:attribute name="versionIDLength" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="contentLocation" type="xs:anyURI" use="optional"/>
		<xs:attribute name="validFrom" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="validTo" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<xs:complexType name="FragmentType">
		<xs:sequence>
			<xs:element name="GroupingCriteria" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="TimeGroupingCriteria" type="TimeGroupingCriteriaType"	minOccurs="0"/>
						<xs:element name="BSMSelector" minOccurs="0" maxOccurs="unbounded">
							<xs:complexType>
								<xs:attribute name="idRef" type="xs:anyURI" use="required"/>
								<xs:attribute name="isAvailableOverIC" type="xs:boolean" use="optional"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="transportID" type="xs:unsignedInt" use="optional"/>
		<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:attribute name="fragmentEncoding" type="FragmentEncodingType" use="required"/>
		<xs:attribute name="fragmentType" type="FragmentTypeType" use="optional"/>
		<xs:attribute name="isAvailableOverIC" type="xs:boolean" use="optional"/>
	</xs:complexType>
	<!--
	Encoding of a Service Guide fragment
	0 - XML encoded OMA BCAST Service Guide fragment
	1 - SDP fragment
	2 - MBMS User Service Description as specified in [26.346] (see 5.1.2.4, SessionDescriptionReference)
	3 - XML encoded Associated Delivery Procedure as specified in [BCAST10-Distribution] section 5.3.4.
	4-127 - reserved for future BCAST extensions
	128-255 - available for proprietary extensions
	-->
	<xs:simpleType name="FragmentEncodingType">
		<xs:union memberTypes="FragmentEncodingLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="FragmentEncodingLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
	Type of an XML encoded BCAST Service Guide fragment
	0 - unspecified
	1 - "Service" Fragment
	2 - "Content" fragment
	3 - "Schedule" Fragment
	4 - "Access" Fragment
	5 - "PurchaseItem" Fragment
	6 - "PurchaseData" Fragment
	7 - "PurchaseChannel" Fragment
	8 - "PreviewData" Fragment
	9 - "InteractivityData" Fragment
	10-127 - reserved for BCAST extensions
	128-255 - available for proprietary extensions
	-->
	<xs:simpleType name="FragmentTypeType">
		<xs:union memberTypes="FragmentTypeLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="FragmentTypeLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="9"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		Signalling whether set of fragments in DescriptorEntry is consistent
		0 - DescriptorEntry represents a PART of a set of fragments that is consistent  (default)
		1 - SINGLE DescriptorEntry represents a set of fragments that is consistent
		2 - SINGLE DescriptorEntry represents a set of fragments that might not be consistent
		3-255 - reserved for future BCAST extensions
	-->
	<xs:simpleType name="DescriptorEntryTypeRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
	======================================
	TerminalCapability type
	=======================================
	-->
	<xs:complexType name="TerminalCapabilityType">
		<xs:sequence>
			<xs:element name="BroadcastServiceDeliveryType" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Type" type="BroadcastServiceDeliveryTypeType" minOccurs="0"/>
						<xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="UnicastDeliveryType" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Type" type="UnicastDeliveryTypeType" minOccurs="0"/>
						<xs:element name="Version" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--
		Terminal Capability: type of Broadcast Service Delivery
		0 - IPDC over DVB-H
		1 - 3GPP MBMS
		2 - 3GPP2 BCMCS
		3 - DVB-SH
		4 - WiMax
		5 - FLO
		6 - DVB-NGH
		7 - DVB-T2
		8-127 - reserved for future use
		128-255 - reserved for proprietary use
	-->
	<xs:simpleType name="BroadcastServiceDeliveryTypeLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="7"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="BroadcastServiceDeliveryTypeType">
		<xs:union memberTypes="BroadcastServiceDeliveryTypeLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<!--
		Terminal Capability: type of Unicast Service Delivery
		0 - 3GPP unicast
		1-127 - reserved for future use
		128-255 - reserved for proprietary use
	-->
	<xs:simpleType name="UnicastDeliveryTypeLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="0"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="UnicastDeliveryTypeType">
		<xs:union memberTypes="UnicastDeliveryTypeLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>

	<!--
	======================================
	SGEntryPoints type
	=======================================
	-->
	<xs:complexType name="SGEntryPointsType">
		<xs:sequence>
			<xs:element name="BSMSelector" type="BSMSelectorIDRefType" minOccurs="0"/>
			<xs:element name="SGEntryPoint" type="SGEntryPointType" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<xs:complexType name="SGEntryPointType">
		<xs:sequence>
			<xs:element name="BroadcastServerSession" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="BDSType" minOccurs="0">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="BDSSpecificEntryPointInfo" type="BDSSpecificEntryPointInfoType" minOccurs="0"/>
								</xs:sequence>
								<xs:attribute name="type" type="BroadcastServiceDeliveryTypeType" use="required"/>
								<xs:attribute name="version" type="xs:string" use="optional"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="ipAddress" type="xs:string" use="required"/>
					<xs:attribute name="port" type="xs:unsignedShort" use="required"/>
					<xs:attribute name="srcIpAddress" type="xs:string" use="optional"/>
					<xs:attribute name="transmissionSessionID" type="xs:unsignedShort" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="UnicastServerURL" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="UnicastType">
							<xs:complexType>
								<xs:simpleContent>
									<xs:extension base="UnicastDeliveryTypeType">
										<xs:attribute name="version" type="xs:string" use="optional"/>
									</xs:extension>
								</xs:simpleContent>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="relationOfICWithBC" type="RelationOfICWithBCType" use="required"/>
					<xs:attribute name="url" type="xs:anyURI" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!--
		Relation between Interaction Channel and Broadcast Channel SG Entry Points
		0 – unicast SG independent from any broadcast SG
		1 – unicast SG complements the broadcast SG
		2 – the unicast SG entry point used to repair the broadcast SG
		3 – unicast SG superset of the broadcast SG
		4-127 - Reserved for future use
		128-255 - Reserved for proprietary use -->
	<xs:simpleType name="RelationOfICWithBCType">
		<xs:union memberTypes="RelationOfICWithBCLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="RelationOfICWithBCLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- BDSSpecificEntryPointInfoType, to be derived by extension for each BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoType" abstract="true"/>
	<!-- BDSSpecificEntryPointInfoType derivation for MBMS BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoMBMSType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="BCBearer" minOccurs="0">
						<xs:complexType>
							<xs:attribute name="TMGI" type="xs:string" use="required"/>
							<xs:attribute name="isCounting" type="xs:boolean" use="required"/>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- BDSSpecificEntryPointInfoType derivation for BCMCS BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoBCMCSType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="NetworkID" type="xs:string"/>
					<xs:element name="ControllerIPAddress" type="xs:string"/>
					<xs:element name="ROHCU" minOccurs="0">
						<xs:complexType>
							<xs:sequence>
								<xs:element name="MaxCID" type="xs:unsignedInt"/>
								<xs:element name="MaxHeaderSize" type="xs:unsignedInt"/>
								<xs:element name="MRRU" type="xs:unsignedInt"/>
							</xs:sequence>
							<xs:attribute name="largeCIDs" type="xs:boolean" use="optional" default="false"/>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- BDSSpecificEntryPointInfoType derivation for DVB-H BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoDVBType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="Frequency" type="xs:unsignedInt" maxOccurs="unbounded"/>
					<xs:element name="UseLPChannel" type="xs:boolean" minOccurs="0"/>
					<xs:element name="IPplatformID">
						<xs:complexType>
							<xs:simpleContent>
								<xs:extension base="xs:unsignedInt">
									<xs:attribute name="networkID" type="xs:unsignedShort" use="optional"/>
								</xs:extension>
							</xs:simpleContent>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- BDSSpecificEntryPointInfoType derivation for DVB-SH BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoDVBSHType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="Frequency" type="xs:unsignedInt" maxOccurs="unbounded"/>
					<xs:element name="UseLPChannel" type="xs:boolean" minOccurs="0"/>
					<xs:element name="IPplatformID">
						<xs:complexType>
							<xs:simpleContent>
								<xs:extension base="xs:unsignedInt">
									<xs:attribute name="networkID" type="xs:unsignedShort" use="optional"/>
								</xs:extension>
							</xs:simpleContent>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- BDSSpecificEntryPointInfoType derivation for FLO IP BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoFLOType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="Tuning" minOccurs="0">
						<xs:complexType>
							<xs:sequence>
								<xs:element name="TuningPriority" type="xs:integer"/>
								<xs:element name="Frequency" type="xs:unsignedInt"/>
								<xs:element name="Bandwidth" type="xs:unsignedInt"/>
								<xs:element name="ROHCU" minOccurs="0">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="MaxCID" type="xs:unsignedInt"/>
											<xs:element name="MaxHeaderSize" type="xs:unsignedInt"/>
											<xs:element name="MRRU" type="xs:unsignedInt"/>
										</xs:sequence>
										<xs:attribute name="largeCIDs" type="xs:boolean" use="optional" default="false"/>
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- BDSSpecificEntryPointInfoType derivation for DVB-NGH and T2 BDS -->
	<xs:complexType name="BDSSpecificEntryPointInfoDVBNGHType">
		<xs:complexContent>
			<xs:extension base="BDSSpecificEntryPointInfoType">
				<xs:sequence>
					<xs:element name="LCD"  >
						<xs:complexType>
							<xs:sequence>
								<xs:element name="PHYParametersDescriptor" maxOccurs="unbounded">
									<xs:complexType>
										<xs:sequence>
										<xs:element name="IOMode" maxOccurs="unbounded">
											<xs:complexType>
												<xs:attribute name="PLPID" type="xs:unsignedByte" use="optional" />
												<xs:attribute name="IOModeValue" type="xs:unsignedByte" use="required" />
											</xs:complexType>
										</xs:element>
											<xs:element name="CellID" maxOccurs="unbounded">
												<xs:complexType>
													<xs:sequence>
														<xs:element name="CentreFrequency" type="xs:unsignedInt" maxOccurs="unbounded"/>
														<xs:element name="SubcellInfo" minOccurs="0" maxOccurs="unbounded">
															<xs:complexType>
																<xs:attribute name="CellIDExtension" type="xs:unsignedByte" use="required" />
																<xs:attribute name="TransposerFrequency" type="xs:unsignedInt" use="required" />
															</xs:complexType>
														</xs:element>
														<xs:element name="ComponentID" type="xs:unsignedByte" maxOccurs="unbounded"/>
													</xs:sequence>
													<xs:attribute name="CellIDValue" type="xs:unsignedShort" use="required" />
												</xs:complexType>
											</xs:element>
										</xs:sequence>
										<xs:attribute name="NetworkID" type="xs:unsignedShort" use="required" />
										<xs:attribute name="SystemID" type="xs:unsignedShort" use="required" />	
										<xs:attribute name="Bandwidth" type="xs:unsignedByte" use="required" />	
										<xs:attribute name="GuardInterval" type="xs:unsignedByte" use="required" />
										<xs:attribute name="TransmissionMode" type="xs:unsignedByte" use="required" />
										<xs:attribute name="CommonClockReferenceID" type="xs:unsignedByte" use="required" />
										<xs:attribute name="OtherFrequencyFlag" type="xs:boolean" use="required" />
										<xs:attribute name="TFSFlag" type="xs:boolean" use="required" />
										<xs:attribute name="NetworkSyncFlag" type="xs:boolean" use="optional" />
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:complexType>
					</xs:element>
					<xs:element name="NCD"  >
						<xs:complexType>
							<xs:sequence>
								<xs:element name="ROHCDescriptor" >
									<xs:complexType>
										<xs:sequence>
											<xs:element name="StaticChain" >
												<xs:complexType>
													<xs:sequence>
														<xs:element name="StaticChainByte" type="xs:unsignedByte" maxOccurs="unbounded"/>
													</xs:sequence>
													<xs:attribute name="StaticInfoLength" type="xs:unsignedByte" use="required" />
												</xs:complexType>
											</xs:element>
										</xs:sequence>
										<xs:attribute name="ContextID" type="xs:unsignedShort" use="required" />
										<xs:attribute name="ContextProfile" type="xs:unsignedByte" use="required" />	
									</xs:complexType>
								</xs:element>
								<xs:element name="URIServiceDescriptor" maxOccurs="unbounded">
									<xs:complexType>
										<xs:sequence>
											<xs:element name="ComponentTableEntry"  maxOccurs="unbounded">
												<xs:complexType>
													<xs:attribute name="ComponentID" type="xs:unsignedByte" use="required"/>
													<xs:attribute name="PLPID" type="xs:unsignedByte" use="required"/>
													<xs:attribute name="URI" type="xs:anyURI" use="required"/>
												</xs:complexType>
											</xs:element>
										</xs:sequence>
										<xs:attribute name="NetworkID" type="xs:unsignedShort" use="required" />
										<xs:attribute name="SystemID" type="xs:unsignedShort" use="required" />	
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:complexType>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--
	======================================
	RMS type
	=======================================
	-->
	<xs:complexType name="RMSType">
		<xs:sequence>
			<xs:element name="BSMSelector" type="BSMSelectorIDRefType" minOccurs="0"/>
			<xs:element name="RMSTemplate" type="RMSTemplateType" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="RMSTemplateType">
		<xs:sequence>
			<xs:element name="Criteria" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="attributeName" type="xs:string" use="optional"/>
					<xs:attribute name="attributeValue" type="xs:string" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Capabilities" type="sg:RichMediaCapabilitiesType"/>
			<xs:element name="Transport" minOccurs="0">
				<xs:complexType>
					<xs:attribute name="ipAddress" type="xs:string" use="required"/>
					<xs:attribute name="port" type="xs:unsignedShort" use="required"/>
					<xs:attribute name="srcIpAddress" type="xs:string" use="optional"/>
					<xs:attribute name="transmissionSessionID" type="xs:unsignedShort" use="required"/>
					<xs:attribute name="hasFDT" type="xs:boolean" default="true" use="optional"/>
					<xs:attribute name="transmissionObjectID" type="xs:positiveInteger" use="required"/>
					<xs:attribute name="contentLocation" type="xs:anyURI" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="AlternativeURL" type="xs:anyURI" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="templateVersion" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!--
	======================================
	Audience Measurement type
	=======================================
	-->
	<xs:complexType name="AudienceMeasurementType">
		<xs:sequence>
			<xs:element name="CampaignInfo" type="CampaignInfoType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="AudienceMeasurementTrigger" type="AudienceMeasurementTriggerType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="CampaignInfoType">
		<xs:sequence>
			<xs:element name="BSMSelector" type="BSMSelectorIDRefType" minOccurs="0"/>
			<xs:element name="CampaignID" type="xs:unsignedInt" maxOccurs="unbounded"/>
			<xs:element name="ServerAddressURL" type="xs:anyURI" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="AudienceMeasurementTriggerType">
		<xs:sequence>
			<xs:element name="BSMSelector" type="BSMSelectorIDRefType" minOccurs="0"/>
			<xs:element name="UserConsentInformation">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="CampaignName" type="xs:string" maxOccurs="unbounded"/>
						<xs:element name="CampaignDescription" type="xs:string" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="consentRequired" type="xs:boolean" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="ServerAddressURL" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:anyURI">
							<xs:attribute name="randomTime" type="xs:decimal" use="required"/>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="AdditionalInfoAddressURL" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="campaignID" type="xs:unsignedInt" use="required"/>
		<xs:attribute name="randomSelector" type="xs:decimal" use="optional"/>
		<xs:attribute name="campaignStartTime" type="xs:unsignedInt" use="required"/>
		<xs:attribute name="campaignEndTime" type="xs:unsignedInt" use="required"/>
	</xs:complexType>
	<!--
	======================================
	SGResponse for interactive SGDD delivery
	=======================================
	-->
	<xs:element name="SGResponse" type="SGResponseType"/>
	<xs:complexType name="SGResponseType">
		<xs:sequence>
			<xs:element name="SupportedVersion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="ServiceGuideDeliveryDescriptor"
				type="ServiceGuideDeliveryDescriptorType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="ResponseValidity" minOccurs="0">
				<xs:complexType>
					<xs:attribute name="expirationTime" use="required" type="xs:unsignedInt"/>
					<xs:attribute name="timeWindow" use="optional" type="xs:decimal"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="status" type="SGResponseStatusType" use="required"/>
		<xs:attribute name="lastResponseVersion" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<xs:simpleType name="ReservedProprietaryExtByteRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="128"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- allowed status codes -->
	<xs:simpleType name="SGResponseStatusCodesType">
		<xs:restriction base="xs:unsignedByte">
			<xs:enumeration value="0"/>
			<xs:enumeration value="7"/>
			<xs:enumeration value="8"/>
			<xs:enumeration value="12"/>
			<xs:enumeration value="16"/>
			<xs:enumeration value="17"/>
			<xs:enumeration value="18"/>
			<xs:enumeration value="20"/>
			<xs:enumeration value="21"/>
			<xs:enumeration value="23"/>
			<xs:enumeration value="28"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SGResponseStatusType">
		<xs:union memberTypes="SGResponseStatusCodesType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
</xs:schema>
