<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.atsc.org/XMLSchemas/meas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.atsc.org/XMLSchemas/meas/1" elementFormDefault="qualified"
	version="1.0">
	<xs:annotation>
		<xs:documentation source="http://www.atsc.org/cms/standards/tbd">
			ATSC Mobile EAS FDT Schema
			Version: 1.0 Date: 10/2/2012
			Location: http://www.atsc.org/XMLSchemas/meas/1
			Namespace: http://www.atsc.org/XMLSchemas/meas/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] as well as
			{insert final Mobile EAS standard name here} [MEAS]
			
			This schema defines XML elements used for FLUTE FDT for
			Mobile EAS NRT. It is based upon the OMA Broadcast Services V1.0 File Description Table
			[OMA-BCAST-FDT] with extensions from the ATSC A/103 NRT and a modification to the File
			element from ATSC Mobile EAS
		</xs:documentation>
	</xs:annotation>
	<!-- IETF elements and datatypes -->
	<xs:element name="FDT-Instance" type="FDT-InstanceType"/>
	<xs:complexType name="FDT-InstanceType">
		<xs:sequence>
			<!-- IETF elements -->
			<xs:element name="File" type="FileType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation> Note that the File element has minOccurs="0" as part of
						[MEAS] which is not present in [OMA-BCAST-FDT] </xs:documentation>
				</xs:annotation>
			</xs:element>
			<!-- BCAST elements -->
			<xs:element name="MBMS-Session-Identity-Expiry" type="MBMS-Session-Identity-Expiry-Type"
				minOccurs="0" maxOccurs="unbounded"/>
			<!-- ATSC A/103 NRT Elements -->
			<xs:element name="FDTContentLinkage" type="FDTContentLinkageType" minOccurs="0"
				maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation> Zero or more of these elements may appear in the OMA
						FDT-InstanceType content model. When they do appear, they shall specify the
						default content linkage tag(s) for all files in the FDT Instance. See
						Section 5.3 of [NRT]. </xs:documentation>
				</xs:annotation>
			</xs:element>
			<!-- other elements -->
			<xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<!-- IETF attributes -->
		<xs:attribute name="Expires" type="xs:string" use="required"/>
		<xs:attribute name="Complete" type="xs:boolean" use="optional"/>
		<xs:attribute name="Content-Type" type="xs:string" use="optional"/>
		<xs:attribute name="Content-Encoding" type="xs:string" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Encoding-ID" type="xs:unsignedByte" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Instance-ID" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Maximum-Source-Block-Length" type="xs:unsignedLong"
			use="optional"/>
		<xs:attribute name="FEC-OTI-Encoding-Symbol-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Max-Number-of-Encoding-Symbols" type="xs:unsignedLong"
			use="optional"/>
		<xs:attribute name="FEC-OTI-Scheme-Specific-Info" type="xs:base64Binary" use="optional"/>
		<!-- BCAST attributes -->
		<xs:attribute name="FullFDT" type="xs:boolean" use="optional" default="false"/>
		<xs:attribute name="Version-ID-Length" type="xs:unsignedLong" use="optional"/>
		<!-- other attributes -->
		<xs:anyAttribute namespace="##other" processContents="skip"/>
	</xs:complexType>
	<xs:complexType name="FileType">
		<xs:sequence>
			<!-- BCAST elements -->
			<xs:element name="MBMS-Session-Identity" type="MBMS-Session-Identity-Type" minOccurs="0"
				maxOccurs="unbounded"/>
			<!-- ATSC A/103 NRT elements -->
			<xs:element name="FileContentLinkage" type="FileContentLinkageType" minOccurs="0"
				maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation> Zero or more of these elements may appear in the OMA FileType
						content model. When they do appear, they shall specify the content linkage
						tag(s) for that specific file. See Section 5.3 of [NRT]. </xs:documentation>
				</xs:annotation>
			</xs:element>
			<!-- other elements -->
			<xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<!-- IETF attributes -->
		<xs:attribute name="Content-Location" type="xs:anyURI" use="required"/>
		<xs:attribute name="TOI" type="xs:positiveInteger" use="required"/>
		<xs:attribute name="Content-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="Transfer-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="Content-Type" type="xs:string" use="optional"/>
		<xs:attribute name="Content-Encoding" type="xs:string" use="optional"/>
		<xs:attribute name="Content-MD5" type="xs:base64Binary" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Encoding-ID" type="xs:unsignedByte" use="optional"/>
		<xs:attribute name="FEC-OTI-FEC-Instance-ID" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Maximum-Source-Block-Length" type="xs:unsignedLong"
			use="optional"/>
		<xs:attribute name="FEC-OTI-Encoding-Symbol-Length" type="xs:unsignedLong" use="optional"/>
		<xs:attribute name="FEC-OTI-Max-Number-of-Encoding-Symbols" type="xs:unsignedLong"
			use="optional"/>
		<xs:attribute name="FEC-OTI-Scheme-Specific-Info" type="xs:base64Binary" use="optional"/>
		<!-- BCAST attributes -->
		<xs:attribute name="Version-ID-Length" type="xs:unsignedLong" use="optional"/>
		<!-- other attributes -->
		<xs:anyAttribute namespace="##other" processContents="skip"/>
	</xs:complexType>
	<!-- BCAST extensions datatypes -->
	<xs:complexType name="MBMS-Session-Identity-Expiry-Type">
		<xs:simpleContent>
			<xs:extension base="MBMS-Session-Identity-Type">
				<xs:attribute name="value" type="xs:unsignedInt" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="MBMS-Session-Identity-Type">
		<xs:restriction base="xs:unsignedByte"/>
	</xs:simpleType>
	<!-- BCAST restrictions datatypes -->
	<!-- MBMS adaptation : Content-Type & FEC-OTI-FEC-Encoding-ID required -->
	<!-- (superset of DVB-H adaptation)                                    -->
	<xs:complexType name="FDT-InstanceType-BdsMbmsDvb">
		<xs:complexContent>
			<xs:restriction base="FDT-InstanceType">
				<xs:sequence>
					<!-- unchanged elements to be listed again -->
					<xs:element name="File" type="FileType" maxOccurs="unbounded"/>
					<xs:element name="MBMS-Session-Identity-Expiry"
						type="MBMS-Session-Identity-Expiry-Type" minOccurs="0" maxOccurs="unbounded"/>
					<xs:any namespace="##other" processContents="skip" minOccurs="0"
						maxOccurs="unbounded"/>
				</xs:sequence>
				<!-- required attributes for MBMS adaptation -->
				<xs:attribute name="Content-Type" type="xs:string" use="required"/>
				<xs:attribute name="FEC-OTI-FEC-Encoding-ID" type="xs:unsignedByte" use="required"/>
				<xs:anyAttribute namespace="##other" processContents="skip"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- DVB-H adaptation : Content-Type required -->
	<xs:complexType name="FDT-InstanceType-BdsDvb">
		<xs:complexContent>
			<xs:restriction base="FDT-InstanceType">
				<xs:sequence>
					<!-- unchanged elements to be listed again -->
					<xs:element name="File" type="FileType" maxOccurs="unbounded"/>
					<xs:element name="MBMS-Session-Identity-Expiry"
						type="MBMS-Session-Identity-Expiry-Type" minOccurs="0" maxOccurs="unbounded"/>
					<xs:any namespace="##other" processContents="skip" minOccurs="0"
						maxOccurs="unbounded"/>
				</xs:sequence>
				<!-- required attributes for DVB-H adaptation -->
				<xs:attribute name="Content-Type" type="xs:string" use="required"/>
				<xs:anyAttribute namespace="##other" processContents="skip"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- DVB-H + MBMS adaptations : Content-Length required -->
	<xs:complexType name="FileType-BdsMbmsDvb">
		<xs:complexContent>
			<xs:restriction base="FileType">
				<xs:sequence>
					<!-- unchanged elements to be listed again -->
					<xs:element name="MBMS-Session-Identity" type="MBMS-Session-Identity-Type"
						minOccurs="0" maxOccurs="unbounded"/>
					<xs:any namespace="##other" processContents="skip" minOccurs="0"
						maxOccurs="unbounded"/>
				</xs:sequence>
				<!-- required attributes for DVB-H & MBMS adaptations -->
				<xs:attribute name="Content-Length" type="xs:unsignedLong" use="required"/>
				<xs:anyAttribute namespace="##other" processContents="skip"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<!-- ASTC A/103 NRT Types -->
	<xs:complexType name="FDTContentLinkageType">
		<xs:simpleContent>
			<xs:extension base="ContentLinkageType">
				<xs:anyAttribute processContents="skip"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="FileContentLinkageType">
		<xs:simpleContent>
			<xs:extension base="ContentLinkageType">
				<xs:attribute name="entry" type="xs:boolean" use="optional" default="false"/>
				<xs:anyAttribute processContents="skip"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="ContentLinkageType">
		<xs:annotation>
			<xs:documentation> ID used to group files in a content item. See Sections 4.3 and 5.3 of
				[NRT]. </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:unsignedInt">
			<xs:minInclusive value="1"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
