<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nrt="http://www.atsc.org/XMLSchemas/nrt/2012/1" targetNamespace="http://www.atsc.org/XMLSchemas/nrt/2012/1" elementFormDefault="qualified" version="1.0">
	<annotation>
		<documentation source="http://www.atsc.org/cms/standards/a_103-2012.pdf">
            ATSC NRT - SG Extensions
            Version: 1.0
            Date: 5/9/2012
            Location: http://www.atsc.org/XMLSchemas/nrt/2012/1/SG1.0.xsd
            Namespace: http://www.atsc.org/XMLSchemas/nrt/2012/1
            
            Information about the use of this schema can be found in ATSC standard
                A/103 Non-Real-Time Content Delivery
            available at http://www.atsc.org/ and referenced as [NRT] below.

            This schema defines XML elements used as extensions to OMA BCAST
                Service Guide documents, to be used for ATSC NRT-specific
                content guide information in Mobile DTV broadcasts.
            Service Guide fragments are expected to consist of XML elements
                from the OMA Broadcast Services V1.0 Service Guide Fragments
                namespace (urn:oma:xml:bcast:sg:fragments:1.0), as defined in
                the schema located (at the time of publication) at
                
                    http://member.openmobilealliance.org/ftp/Public_documents/bcast/Permanent_documents/OMA-SUP-XSD_bcast_sg_fragments-V1_0-20090212-A.zip
                with extension elements inserted in a manner consistent with
                that schema. Specifically, all extensions make use of the wildcard
                provision within PrivateExt subelements specified in the OMA SG schema,
                as mandated for Mobile DTV transmissions in ATSC A/153 Part 4.
            (Note: The ATSC NRT standard also allows the use of certain OMA SG
                elements not called out in A/153; these are not described in
                this schema.)
        </documentation>
	</annotation>
	<!-- GLOBAL ELEMENTS -->
	<element name="CircularArea">
		<annotation>
			<documentation>
                Defines the CircularArea element that can be used for receiver targeting.
                See Section 9.3 of [NRT].
            </documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="coord">
					<complexType>
						<sequence>
							<element name="X">
								<simpleType>
									<restriction base="float">
										<minInclusive value="-180"/>
										<maxInclusive value="180"/>
									</restriction>
								</simpleType>
							</element>
							<element name="Y">
								<simpleType>
									<restriction base="float">
										<minInclusive value="-90"/>
										<maxInclusive value="90"/>
									</restriction>
								</simpleType>
							</element>
							<element name="scr" type="integer"/>
						</sequence>
					</complexType>
				</element>
				<element name="radius" type="unsignedInt"/>
				<element name="distanceUnit" type="string" minOccurs="0"/>
			</sequence>
			<attribute name="gid" type="string" use="optional"/>
			<attribute name="srsName" type="string" use="optional"/>
		</complexType>
	</element>
	<element name="ServicePrivateExt" type="nrt:ServicePrivateExtType">
		<annotation>
			<documentation>
                This element is a wrapper for ATSC NRT extensions to OMA BCAST SG Service fragments.
                It shall only be used inside a PrivateExt element within a Service fragment.
            </documentation>
		</annotation>
	</element>
	<complexType name="ServicePrivateExtType">
		<annotation>
			<documentation>
                Defines the set of NRT extension elements that may be added to Service fragments.
                See Section 7.2.4.1 of [NRT].
            </documentation>
		</annotation>
		<sequence>
			<element name="ConsumptionModel" type="nrt:ConsumptionModelType" minOccurs="0"/>
			<element name="EssentialCapabilities" type="nrt:CapabilitiesType" minOccurs="0"/>
			<element name="NonessentialCapabilities" type="nrt:CapabilitiesType" minOccurs="0"/>
			<element name="RequiredStorage" type="nrt:RequiredStorageType" minOccurs="0"/>
			<element name="AutoUpdate" type="nrt:AutoUpdateType" minOccurs="0"/>
			<element name="ContentDefaults" type="nrt:ContentDefaultsType" minOccurs="0"/>
			<element name="AssociatedServiceReference" type="nrt:AssociatedServiceReferenceType" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<element name="ContentPrivateExt" type="nrt:ContentPrivateExtType">
		<annotation>
			<documentation>
                This element is a wrapper for ATSC NRT extensions to OMA BCAST SG Content fragments.
                It shall only be used inside a PrivateExt element within a Content fragment.
            </documentation>
		</annotation>
	</element>
	<complexType name="ContentPrivateExtType">
		<annotation>
			<documentation>
                Defines the set of NRT extension elements that may be added to Content fragments.
                See Section 7.2.4.3 of [NRT].
            </documentation>
		</annotation>
		<sequence>
			<element name="ContentLinkage" type="nrt:ContentLinkageType"/>
			<element name="EssentialCapabilities" type="nrt:CapabilitiesType" minOccurs="0"/>
			<element name="NonessentialCapabilities" type="nrt:CapabilitiesType" minOccurs="0"/>
			<element name="RequiredStorage" type="nrt:RequiredStorageType" minOccurs="0"/>
			<element name="UpdatesAvailable" type="nrt:UpdatesAvailableType" minOccurs="0"/>
			<element name="InternetLocations" type="nrt:InternetLocationsType" minOccurs="0"/>
			<element name="PlaybackDelay" type="nrt:PlaybackDelayType" minOccurs="0"/>
		</sequence>
	</complexType>
	<!-- TYPE DEFINITIONS -->
	<complexType name="ContentDefaultsType">
		<annotation>
			<documentation>
                Defines the set of NRT extension elements that may be specified at the service level as default values for content items.
                See Section 7.2.4.1.4 of [NRT].
            </documentation>
		</annotation>
		<sequence>
			<element name="RequiredStorage" type="nrt:RequiredStorageType" minOccurs="0"/>
			<element name="UpdatesAvailable" type="nrt:UpdatesAvailableType" minOccurs="0"/>
			<element name="AcquisitionTime" type="nrt:AcquisitionTimeType" minOccurs="0"/>
			<element name="InternetLocations" type="nrt:InternetLocationsType" minOccurs="0"/>
		</sequence>
	</complexType>
	<simpleType name="ConsumptionModelType">
		<annotation>
			<documentation>
                Consumption model (NRT service category) used to guide receiver behavior in handling NRT content.
                See Section 7.2.4.1.3 of [NRT].
            </documentation>
		</annotation>
		<restriction base="unsignedByte">
			<minInclusive value="1"/>
			<maxInclusive value="63"/>
		</restriction>
	</simpleType>
	<complexType name="CapabilitiesType">
		<annotation>
			<documentation>
                Capabilities used by a receiver in presentation of a content item or service.
                May be used to define a list of essential capabilities (required for meaningful presentation) or a list of non-essential ones, depending on context.
                See Sections 7.2.4.1.3 and 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<sequence>
			<element name="CapabilityCodes" type="nrt:CapabilityCodeListType" minOccurs="0"/>
			<element name="CapabilityString" type="nrt:CapabilityStringType" minOccurs="0" maxOccurs="unbounded"/>
			<element name="CapabilityOrGroup" type="nrt:CapabilityOrGroupType" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="CapabilityOrGroupType">
		<annotation>
			<documentation>
                Group of capabilities to be combined with "OR" logic.
            </documentation>
		</annotation>
		<sequence>
			<element name="CapabilityCodes" type="nrt:CapabilityCodeListType" minOccurs="0"/>
			<element name="CapabilityString" type="nrt:CapabilityStringType" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<simpleType name="CapabilityCodeListType">
		<list itemType="nrt:CapabilityCodeType"/>
	</simpleType>
	<simpleType name="CapabilityCodeType">
		<restriction base="unsignedByte">
			<minInclusive value="1"/>
			<maxInclusive value="127"/>
		</restriction>
	</simpleType>
	<complexType name="CapabilityStringType">
		<simpleContent>
			<extension base="nrt:CapabilityPatternType">
				<attribute name="category" type="unsignedByte" use="required"/>
			</extension>
		</simpleContent>
	</complexType>
	<simpleType name="CapabilityPatternType">
		<!-- Actually a union of string pattern types (see Table 8.8 in [NRT]) but not constrained in this schema -->
		<restriction base="string"/>
	</simpleType>
	<simpleType name="RequiredStorageType">
		<annotation>
			<documentation>
                Receiver storage (in kB) expected to be sufficient for handling of a content item, or of an entire service, depending on context.
                See Sections 7.2.4.1.3, 7.2.4.1.4 and 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<restriction base="unsignedInt">
			<minInclusive value="1"/>
		</restriction>
	</simpleType>
	<simpleType name="AutoUpdateType">
		<annotation>
			<documentation>
                Indicator of whether auto-update should be offered to the user for a service.
                See Section 7.2.4.1.3 of [NRT].
            </documentation>
		</annotation>
		<restriction base="boolean"/>
	</simpleType>
	<complexType name="AssociatedServiceReferenceType">
		<annotation>
			<documentation>
                Used to point to an adjunct NRT service from another M/H service (idRef is the id attribute of the referenced Service fragment).
                See Section 7.2.4.1.5 of [NRT].
            </documentation>
		</annotation>
		<attribute name="idRef" type="anyURI" use="required"/>
	</complexType>
	<simpleType name="AcquisitionTimeType">
		<annotation>
			<documentation>
                Expected acquisition time (in seconds), equivalent to the "duration" parameter of DistributionWindow subelement of Schedule fragment. Used for service level default.
                See Section 7.2.4.1.4 of [NRT].
            </documentation>
		</annotation>
		<restriction base="unsignedInt">
			<minInclusive value="1"/>
		</restriction>
	</simpleType>
	<simpleType name="ContentLinkageType">
		<annotation>
			<documentation>
                ID used to group files in a content item.
                See Section 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<restriction base="unsignedInt">
			<minInclusive value="1"/>
		</restriction>
	</simpleType>
	<simpleType name="UpdatesAvailableType">
		<annotation>
			<documentation>
                Indicator of availability of updates to a content item.
                See Section 7.2.4.1.4 and 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<restriction base="boolean"/>
	</simpleType>
	<complexType name="InternetLocationsType">
		<annotation>
			<documentation>
                List of URLs identifying Content-Locations of files retrievable from the internet.
                The attribute all="true" can be used to indicate all files in a content item are available; in this case the element should be empty.
                See Section 7.2.4.1.4 and 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<simpleContent>
			<extension base="nrt:InternetLocationListType">
				<attribute name="all" type="boolean" use="optional" default="false"/>
			</extension>
		</simpleContent>
	</complexType>
	<simpleType name="InternetLocationListType">
		<list itemType="nrt:InternetLocationType"/>
	</simpleType>
	<simpleType name="InternetLocationType">
		<!-- Note: Subject to constraints in [NRT] not currently expressed in this schema -->
		<restriction base="anyURI"/>
	</simpleType>
	<simpleType name="PlaybackDelayType">
		<annotation>
			<documentation>
                Delay (in seconds) between reception of first byte and playback for a progressively downloaded content item.
                See Section 7.2.4.3.2 of [NRT].
            </documentation>
		</annotation>
		<restriction base="unsignedInt">
			<maxInclusive value="1048575"/>
		</restriction>
	</simpleType>
</schema>
