﻿<?xml version="1.0" encoding="UTF-8"?>
<!--

	FILE INFORMATION

	Description
		BCAST enabler - Notification Messages

	Version: 1.3
	Date:    31 Jan 2017

	OMA Permanent Document
		File: OMA-SUP-XSD_bcast_nt_message-V1_3-20170131-A
		Type: Text - XML Schema Definition

	Public Reachable Information
		Path: http://www.openmobilealliance.org/tech/profiles
		Name: bcast_nt_message-v1_3.xsd

	NORMATIVE INFORMATION

	Information about this file can be found in the latest revision of
	the specification OMA-TS-BCAST_Services-V1_3 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 2017 Open Mobile Alliance All Rights Reserved.
	Used with the permission of the Open Mobile Alliance under the
	terms set forth above.
-->
<!--
	CHANGE HISTORY

    31012017 Status changed to Approved by TP, TP Ref # OMA-TP-2017-0003-INP_BCAST-V1_3_ERP_for_Final_Approval
	
-->
<xs:schema
	targetNamespace="urn:oma:xml:bcast:nt:message:1.3"
	xmlns="urn:oma:xml:bcast:nt:message:1.3"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:sg="urn:oma:xml:bcast:sg:fragments:1.3"
	xmlns:sgdd="urn:oma:xml:bcast:sg:sgdd:1.3"
	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:sgdd:1.3" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_sgdd-v1_3.xsd"/>
	<xs:import namespace="urn:oma:xml:bcast:sg:fragments:1.3" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_fragments-v1_3.xsd"/>

	<!--
		==================================================
		Notification Message Structure
		==================================================
	-->
	<xs:element name="NotificationMessage" type="NotificationMessageType"/>
	<xs:complexType name="NotificationMessageType">
		<xs:sequence>
			<xs:element name="IDRef" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Title" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Description" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="PresentationType" type="PresentationRangeType" minOccurs="0"/>
			<xs:element name="Extension" type="ExtensionType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SessionInformation" type="SessionInformationType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="MediaInformation" type="MediaInformationType" minOccurs="0"/>
			<xs:element name="ServiceGuide" type="ServiceGuideType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="AuxDataTrigger" type="AuxDataTriggerType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="TerminalProvisioning" type="TerminalProvisioningType" minOccurs="0"/>
			<xs:element name="PrivateExt" type="PrivateExtType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:anyURI" use="required"/>
		<xs:attribute name="version" type="xs:unsignedInt" use="required"/>
		<xs:attribute name="notificationType" type="NotificationRangeType" use="required"/>
		<xs:attribute name="eventType" type="EventRangeType" use="required"/>
		<xs:attribute name="validTo" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!--
		==================================================
		Referenced Types
		==================================================
	-->
	<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:complexType name="ExtensionType">
		<xs:sequence>
			<xs:element name="Description" type="LanguageString" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="url" type="xs:anyURI" use="required"/>
	</xs:complexType>
	<!-- Session Information -->
	<xs:complexType name="SessionInformationType">
		<xs:sequence>
			<xs:element name="DeliverySession" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="ContentLocation" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="ipAddress" type="xs:string" use="required"/>
					<xs:attribute name="port" type="xs:unsignedShort" use="required"/>
					<xs:attribute name="sourceIP" type="xs:string" use="optional"/>
					<xs:attribute name="transmissionSessionID" type="xs:unsignedShort" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="AlternativeURI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="validFrom" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="validTo" type="xs:unsignedInt" use="optional"/>
		<xs:attribute name="usageType" type="UsageRangeType" use="optional" default="0"/>
	</xs:complexType>
	<!-- Media Information -->
	<xs:complexType name="MediaInformationType">
		<xs:sequence>
			<xs:element name="DeliverySession" 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="sourceIP" type="xs:string" use="optional"/>
					<xs:attribute name="transmissionSessionID" type="xs:unsignedShort" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Picture" type="PictureNType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="Video" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="AlternativeURI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
					<xs:attribute name="mimeType" type="xs:string" use="optional"/>
					<xs:attribute name="codec" type="xs:string" use="optional"/>
					<xs:attribute name="videoURI" type="xs:anyURI" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Audio" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="AlternativeURI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</xs:sequence>
					<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
					<xs:attribute name="mimeType" type="xs:string" use="optional"/>
					<xs:attribute name="codec" type="xs:string" use="optional"/>
					<xs:attribute name="audioURI" type="xs:anyURI" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="RichMedia" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Capabilities" type="sg:RichMediaCapabilitiesType"/>
						<xs:choice>
							<xs:element name="RichMediaData">
								<xs:complexType>
									<xs:simpleContent>
										<xs:extension base="xs:string">
											<xs:attribute name="encoding" type="sg:EncodingType" use="optional"/>
										</xs:extension>
									</xs:simpleContent>
								</xs:complexType>
							</xs:element>
							<xs:element name="RichMediaURI" type="xs:anyURI"/>
						</xs:choice>
						<xs:element name="AlternativeText" type="sg:EncodedLanguageString" minOccurs="0" maxOccurs="unbounded"/>
						<xs:element name="AlternativePicture" type="PictureNType" minOccurs="0"/>
					</xs:sequence>
					<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!-- Service Guide placeholder -->
	<xs:complexType name="ServiceGuideType">
		<xs:sequence>
			<xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<!-- AUX data trigger -->
	<xs:complexType name="AuxDataTriggerType">
		<xs:sequence>
			<xs:element name="GlobalContentID" type="xs:anyURI" maxOccurs="unbounded"/>
			<xs:element name="FilteringData" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:choice>
						<xs:element name="Location" type="xs:anyURI" minOccurs="0"/>
						<xs:element name="TargetProfile" type="TargetProfileType" minOccurs="0" maxOccurs="unbounded"/>
						<xs:element name="FilterID" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="PresentationRule" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="IDRef" type="xs:anyURI" minOccurs="0"/>
					</xs:sequence>
					<xs:attribute name="renderingTime" type="xs:unsignedInt" use="optional"/>
					<xs:attribute name="duration" type="xs:unsignedShort" use="optional"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TargetProfileType">
		<xs:sequence>
			<xs:element name="Attribute" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="name" type="xs:string" use="required"/>
					<xs:attribute name="value" type="xs:string" use="required"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="FilterRules" type="xs:string" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="filterID" type="xs:anyURI" use="optional"/>
	</xs:complexType>
	<!-- Terminal Provisioning -->
	<xs:complexType name="TerminalProvisioningType">
		<xs:sequence>
			<xs:element name="Target" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Extensions" minOccurs="0" maxOccurs="unbounded">
							<xs:complexType>
								<xs:attribute name="attributeName" type="xs:string" use="required"/>
								<xs:attribute name="attributeValue" type="xs:string" use="required"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="version" type="xs:unsignedInt" use="optional"/>
					<xs:attribute name="manufacturer" type="xs:string" use="optional"/>
					<xs:attribute name="model" type="xs:string" use="optional"/>
					<xs:attribute name="hardware" type="xs:string" use="optional"/>
					<xs:attribute name="dm" type="DmType" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="TargetArea" type="sg:TargetAreaType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute name="type" type="TerminalProvisioningTypeType" use="required"/>
	</xs:complexType>
	<!--
		DM Type. Allowed values are:
		0 – DM 1.3
		1 – DM 2.0
		2 – FUMO 1.0
		3 – SCoMO 1.0
		4 – DiagMon 1.0
		5 - 127  reserved for future use
		128 -255 reserved for proprietary use
	-->
	<xs:simpleType name="DmType">
		<xs:union memberTypes="DmLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="DmLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="4"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		TerminalProvisioningType Type. Allowed values are:
		0 - Firmware update [FUMO]
		1 - Software update [SCOMO]
		2 - Device Capability Control
		3 - 127  reserved for future use
		128 -255 reserved for proprietary use
	-->
	<xs:simpleType name="TerminalProvisioningTypeType">
		<xs:union memberTypes="TerminalProvisioningTypeLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="TerminalProvisioningTypeLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- type for proprietary 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>
	<xs:complexType name="PictureNType">
		<xs:sequence>
			<xs:element name="AlternativeURI" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="mimeType" type="xs:string" use="optional"/>
		<xs:attribute name="pictureURI" type="xs:anyURI" use="optional"/>
		<xs:attribute name="relativePreference" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!--
		==================================================
		Notification Message Container
		==================================================
	-->
	<xs:complexType name="NotificationMessageContainerType">
		<xs:sequence>
			<xs:element name="NotificationMessage" type="NotificationMessageType" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="NotificationMessageContainer" type="NotificationMessageContainerType"/>
	<!--
		==================================================
		Enumeration Types
		==================================================
	-->
	<!-- reserved for proprietary use -->
	<xs:simpleType name="ReservedProprietaryExtByteRangeType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="128"/>
			<xs:maxInclusive value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		Notification Type. Allowed values are:
		0 - indicates that this message is user-oriented
		1 - indicates that this message is terminal-oriented
		2-127: For future use
		128-255: For proprietary use
	-->
	<xs:simpleType name="NotificationRangeType">
		<xs:union memberTypes="NotificationLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="NotificationLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		Event Type. Allowed values are:
		0 - Reserved for future use.
		1 - Emergency notification
		2 - SG download or update notification
		3 - File download or update notification
		4 - Service availability notification
		5 - Supplemental service notification
		6 - Auxiliary Data Trigger for Real-time main contents
		7 - Auxiliary Data Trigger for Non-Real-time main  contents
		8 - Terminal Provisioning Trigger
		9-127: For future use
		128-255: For proprietary use
	-->
	<xs:simpleType name="EventRangeType">
		<xs:union memberTypes="EventLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="EventLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="1"/>
			<xs:maxInclusive value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		Recommends the type of presentation for the received Notification Messages based on the priority of the Notification Message. Allowed values are:
		0 - For high priority Notification Messages, Terminal MAY immediately render the message after interrupting all the applications.
		1 - For medium priority Notification Messages, Terminal MAY immediately render the message, overlaying the present playing services.
		2 - For low priority Notification Messages, Terminal MAY NOT immediately render the message, the user can see the stored message whenever he or she wants.
		3-127: For future use
		128-255: For proprietary use
	-->
	<xs:simpleType name="PresentationRangeType">
		<xs:union memberTypes="PresentationLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="PresentationLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<!--
		Allowed values are:
		0 - unspecified
		1 - files
		2- streams
		3 - SGDD only
		4 - mixed SGDD and SGDU
		5 - notification
		6 - Terminal Provisioning Package
		7-127 reserved for future use
		128-255 reserved for proprietary use
	-->
	<xs:simpleType name="UsageRangeType">
		<xs:union memberTypes="UsageLRType ReservedProprietaryExtByteRangeType"/>
	</xs:simpleType>
	<xs:simpleType name="UsageLRType">
		<xs:restriction base="xs:unsignedByte">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="6"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
