<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	Mobile Broadcast - Notification Messages
		version 	- 1.0
		date    	- 30 Sep 2008
		
    FILE INFORMATION

	OMA Permanent Document
	   File: OMA-SUP-XSD_bcast_nt_message-V1_0-20080930-C
	   Type: Text - Schema Description

	Public Reachable Information
	   Path: http://www.openmobilealliance.org/tech/profiles
	   Name: bcast_nt_message-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
	
	20061006 	File created
	20070129	CR OMA-BCAST-2007-0123-CR_Updates_to_Notification_Message_XML_Schema implemented. 
					- made consistent with OMA-TS-BCAST_Service_Guide-V1_0_0-20070104-D
					- backend messages have been moved to the document bcast_nt_backend-V1_0.xsd
					- added type range checks where necessary
	20070308 	Clerical change: referencing TS Services instead of TS SG 
	20070405 	made consistent with OMA-TS-BCAST_Services-V1_0-20070403-D
	20070410  CR BCAST-2007-0473 implemented to make consistent with OMA-TS-BCAST_Services-V1_0-20070406-D
					after followup consistency review. 
	20070424 	Made consistent with OMA-TS-BCAST_Services-V1_0-20070423-D
	20070425	Version to enter Candidate approval. 
					Clerical: made naming consistent with OMNA rules
	20070911	Made consistent with OMA-TS-BCAST_Services-V1_0-20070907-C 
	20080226	Re-publication - aligned with OMA-TS-BCAST_Services-V1_0-20080226-C
	20080522	Aligned with OMA-TS-BCAST_Services-V1_0-20080522-D
	20080930	Clerical: Fixed a problem with garbage characters in the comment of  PresentationRangeType and Usage RageType
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:oma:xml:bcast:nt:message:1.0" targetNamespace="urn:oma:xml:bcast:nt:message:1.0" xmlns:sgdd="urn:oma:xml:bcast:sg:sgdd:1.0" 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.0" schemaLocation="http://www.openmobilealliance.org/tech/profiles/bcast_sg_sgdd-v1_0.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="SGDD" type="sgdd:ServiceGuideDeliveryDescriptorType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SGDDReference" type="ReferenceType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="FragmentReference" type="ReferenceType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="AuxDataTrigger" type="AuxDataTriggerType" minOccurs="0" maxOccurs="unbounded"/>
			<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="xs:unsignedByte" 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" type="DeliverySessionType" minOccurs="0"/>
			<xs:element name="AlternativeURI" type="xs:anyURI" minOccurs="0"/>
		</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>
	<xs:complexType name="DeliverySessionType">
		<xs:sequence>
			<xs:element name="TransportObjectID" type="xs:positiveInteger" 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>
	<!-- Media Information -->
	<xs:complexType name="MediaInformationType">
		<xs:sequence>
			<xs:element name="Picture" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="mimeType" type="xs:string" use="optional"/>
					<xs:attribute name="pictureURI" type="xs:anyURI" use="optional"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Video" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<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: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:sequence>
	</xs:complexType>
	<!-- Fragment or SGDD Reference -->
	<xs:complexType name="ReferenceType">
		<xs:attribute name="id" type="xs:anyURI" use="optional"/>
		<xs:attribute name="version" type="xs:unsignedInt" use="optional"/>
	</xs:complexType>
	<!-- AUX data trigger -->
	<xs:complexType name="AuxDataTriggerType">
		<xs:sequence>
			<xs:element name="GlobalContentID" type="xs:anyURI" minOccurs="0"/>
			<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: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>
	<!-- 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>
	<!-- 
		==================================================
		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 - this message is user-oriented message, such as notice from SP, emergency, etc.
		1- this message is terminal-oriented message, such as start of service, file download, AuxDataTrigger, etc.
		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>
	<!--
		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-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="5"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
