<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="nes.cex.sp.ml.nagra.com" targetNamespace="nes.cex.sp.ml.nagra.com" elementFormDefault="qualified">
	<xs:complexType name="BaseResourceType">
		<xs:annotation>
			<xs:documentation>This element defines common attributes of all root elements</xs:documentation>
		</xs:annotation>
		<xs:attribute name="providerId" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>id of the content provider</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="providerResourceId" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>id of the resource for this specific content provider</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="id" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Public id unique across all content provider ids</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="preferenceSetType">
	    <xs:annotation>
	      <xs:documentation>set of preferences</xs:documentation>
	    </xs:annotation>
	    <xs:sequence>
	      <xs:element name="preference" type="ResourcesReferenceType" minOccurs="0" maxOccurs="unbounded">
	      </xs:element>
	    </xs:sequence>
	  </xs:complexType>
	  <xs:complexType name="ResourcesReferenceType">
    <xs:annotation>
      <xs:documentation>type describing a resource type</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BaseResourceType">
        <xs:attribute name="type" type="ResourcesEnumType" use="required">
          <xs:annotation>
            <xs:documentation>Allows to specify the kind of resource that a content group is linked to (allowed values: editorialContent,contentGroup)</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ResourcesEnumType">
    <xs:annotation>
      <xs:documentation>enumeration characterizing a resource type</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="editorialContent"/>
      <xs:enumeration value="contentGroup"/>
      <xs:enumeration value="editorialChannel"/>
    </xs:restriction>
  </xs:simpleType>
	<xs:complexType name="BaseResourceTypeWithMetadata">
		<xs:annotation>
			<xs:documentation>This element defines common attributes of all root elements</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="BaseResourceType">
				<xs:sequence>
					<xs:element name="metadataSet" type="MetadataSetType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>This element defines a specific set of metadata for a specific locale.
Only one MetadataSet per locale is allowed.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="name" type="xs:string" use="required">
					<xs:annotation>
						<xs:documentation>Working name of the resource (used usually to identify a resource in the operator User Interface)</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="MetadataType">
		<xs:annotation>
			<xs:documentation>Metadata value</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="key" type="xs:string" use="required">
					<xs:annotation>
						<xs:documentation>Metadata key.
it must be unique for a specific resource and for a specific locale.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="MetadataSetType">
		<xs:sequence>
			<xs:element name="metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Metadata editorial or not of the metadata owner. The different metadata allowed and their definition must be defined outside of the scheme</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="locale" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Language-country code in which the metadata set is written.
It must be conformed to ISO-639 and ISO 3166-1.
If the MetadataSet is not localised, the locale must be set to "none".</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="MetadataSetNoLocaleType">
		<xs:annotation>
			<xs:documentation>The Metadata Set Type which defines a specific set of metadata for the locale "none"</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="MetadataSetType">
				<xs:sequence>
					<xs:element name="metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded">
						<xs:annotation>
							<xs:documentation>A metadata.</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="locale" type="xs:string" use="required" fixed="none">
					<xs:annotation>
						<xs:documentation>locale will be set to "none" as it is not localised</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
    <xs:complexType name="SecurityInfoType">
      <xs:annotation>
        <xs:documentation>type describing a set of data related to a security device (CAS, DRM)</xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="metadataSet" type="MetadataSetNoLocaleType" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The Metadata Set Type which defines a specific set of metadata for the locale "none"</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="id" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Drm or Cas id of the element for the specified security device (Drm or Cas). 
  This Drm/Cas id is only valid in the context of the Drm/Cas device specified</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="securityDeviceId" use="required">
        <xs:annotation>
          <xs:documentation>Id of the security device (Cas or Drm) assigned to the content.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
    
    <xs:complexType name="ParentalRatingSetType">
      <xs:annotation>
        <xs:documentation>Set of Parental rating is used to decide suitability for certain audiences based on its content</xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="parentalRating" type="ParentalRatingType" minOccurs="0" maxOccurs="unbounded">
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  
    <xs:complexType name="ParentalRatingType">
    <xs:annotation>
      <xs:documentation>Parental rating is used to decide suitability for certain audiences based on its content</xs:documentation>
    </xs:annotation>
      <xs:attribute name="ratingBodyName" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The friendly name of the ratings body. This is unique across all ratings bodies in the system</xs:documentation>
        </xs:annotation>        
      </xs:attribute>
      <xs:attribute name="contentRatingCode" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The content rating code. This is unique across all content ratings in the system</xs:documentation>
        </xs:annotation>        
      </xs:attribute>
       <xs:attribute name="countryCode" type="TwoCharString"  use="required">
        <xs:annotation>
          <xs:documentation>The country code.</xs:documentation>
        </xs:annotation>        
      </xs:attribute>
  </xs:complexType>
  <xs:complexType name="ImageSetType">
    <xs:annotation>
        <xs:documentation>Element that defines the set of images</xs:documentation>
    </xs:annotation>
    <xs:sequence>
        <xs:element name="image" type="ImageType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="PersonSetType">
    <xs:annotation>
        <xs:documentation>Set of Persons and associated metadata</xs:documentation>
    </xs:annotation>
    <xs:sequence>
        <xs:element name="person" type="PersonType" minOccurs="1" maxOccurs="unbounded">
        </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="PersonType">
    <xs:annotation>
        <xs:documentation>Defines a person element ie., the cast or crew</xs:documentation>
    </xs:annotation>
    <xs:sequence>
        <xs:element name="names" type="NamesType" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
                <xs:documentation>Defines the locale specific name of the person</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="details" type="DetailsType" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
                <xs:documentation>Defines the locale specific bio data of the person</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="roles" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>One more roles played by the person for this program, semi colon separated. For example writer, director, actor</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="images" type="ImageSetType" minOccurs="0" maxOccurs="1">
        </xs:element>

        <xs:element name="externalIds" type="ExternalIdsType" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Source information of the person</xs:documentation>
            </xs:annotation>
        </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:string" use="required">
        <xs:annotation>
            <xs:documentation>Unique identifier of the person</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="dateOfBirth" type="xs:string" use="optional">
        <xs:annotation>
            <xs:documentation>Date of birth of the person in 'YYYY-MM-DD' format</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="type" type="xs:string" use="required">
        <xs:annotation>
            <xs:documentation>The type of person, restricted to cast or persona</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>


  <xs:complexType name="NamesType">
    <xs:sequence>
        <xs:element name="name" type="xs:string" minOccurs="0">
            <xs:annotation>
                <xs:documentation>locale specific name of the person</xs:documentation>
            </xs:annotation>
        </xs:element>
    </xs:sequence>
    <xs:attribute name="locale" type="xs:string" use="optional">
        <xs:annotation>
            <xs:documentation>Language-country code in which the name is written.It must be conformed to ISO-639 and ISO 3166-1.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="DetailsType">
    <xs:sequence>
        <xs:element name="bio" type="xs:string" minOccurs="0">
            <xs:annotation>
                <xs:documentation>locale specific bio data of the person</xs:documentation>
            </xs:annotation>
        </xs:element>
    </xs:sequence>
    <xs:attribute name="locale" type="xs:string" use="optional">
        <xs:annotation>
            <xs:documentation>Language-country code in which the bio data is written.It must be conformed to ISO-639 and ISO 3166-1.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="ImageType">
    <xs:annotation>
        <xs:documentation>Element that defines an image and its associated properties</xs:documentation>
    </xs:annotation>
    <xs:sequence>
        <xs:element name="height" type="xs:integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>image height</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="width" type="xs:integer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>image width</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="orientation" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>image orientation, for example, landscape or portrait</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="aspect" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Aspect ratio of the Image, for example, 16x9</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Category of the Image</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="text" type="ImageTextEnumType" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Indicates if the filter for image types is with or without text. It is a fixed value, could be either yes or no</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="primary" type="xs:boolean" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Indicates if the image is primary or not</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="captions" type="CaptionsType" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
                <xs:documentation>Set of locale specific image titles</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="externalSource" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Source information of the image</xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="externalResourceId" type="xs:string" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>Resource ID of the Source</xs:documentation>
            </xs:annotation>
        </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:string" use="required">
        <xs:annotation>
            <xs:documentation>unique identifier of the image</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="uri" type="xs:string" use="optional">
        <xs:annotation>
            <xs:documentation>Uri of the image for download</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="status" type="StatusEnumType" use="optional">
        <xs:annotation>
            <xs:documentation>The Status of the image, could be either active or inactive</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="CaptionsType">
    <xs:annotation>
        <xs:documentation>Element defining the locale specific title of the image </xs:documentation>
    </xs:annotation>
    <xs:sequence>
        <xs:element name="title" type="xs:string" minOccurs="0">
            <xs:annotation>
                <xs:documentation>Locale specific name of the image</xs:documentation>
            </xs:annotation>
        </xs:element>
    </xs:sequence>
    <xs:attribute name="locale" type="xs:string" use="optional">
        <xs:annotation>
            <xs:documentation>Language-country code in which the caption title is written. It must conform to ISO-639 and ISO 3166-1.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="ExternalIdsType">
    <xs:sequence>
        <xs:element name="externalSource" type="ExternalSourceType" minOccurs="1" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ExternalIdType">
    <xs:sequence>
        <xs:element name="externalSource" type="ExternalSourceType" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ExternalSourceType">
    <xs:attribute name="sourceName" type="xs:string" use="required">
        <xs:annotation>
            <xs:documentation>Name of the external source, for example, gracenote, imdb etc., </xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="resourceId" type="xs:string" use="required">
        <xs:annotation>
            <xs:documentation>Identifier of the resource(person or image) in the external source</xs:documentation>
        </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <!-- image text type enum -->
  <xs:simpleType name="ImageTextEnumType">
    <xs:annotation>
        <xs:documentation>enumeration characterizing an image text type</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
        <xs:enumeration value="yes" />
        <xs:enumeration value="no" />
    </xs:restriction>
  </xs:simpleType>
  <!-- status type enum -->
  <xs:simpleType name="StatusEnumType">
    <xs:annotation>
        <xs:documentation>enumeration characterizing status type</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
        <xs:enumeration value="active" />
        <xs:enumeration value="inactive" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="TwoCharString">
    <xs:annotation>
      <xs:documentation>2-char strings only</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:length value="2"/>
    </xs:restriction>
  </xs:simpleType>
  
	<xs:complexType name="PeriodType">
		<xs:annotation>
			<xs:documentation>Defines a period of time with a start date and an end date.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="start" type="gmtdatetime">
			<xs:annotation>
				<xs:documentation>Start date of the parent resource. 
A ISO 8601 compatible gmt datetime up to the second: yyyy-mm-ddThh:mm:ssZ.
If not available, any query condition against start will be true</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="end" type="gmtdatetime">
			<xs:annotation>
				<xs:documentation>End date of the parent resource. 
A ISO 8601 compatible gmt datetime up to the second: yyyy-mm-ddThh:mm:ssZ.
If not available, any query condition against end will be true.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="gmtdatetime">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9]Z"/>
		</xs:restriction>
	</xs:simpleType>

    <xs:complexType name="UnifiedContentGroupType">
        <xs:complexContent>
            <xs:extension base="BaseResourceTypeWithMetadata">
                <xs:sequence>
                    <xs:element name="period" type="PeriodType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>This period allows to specify the start and end date of the content group</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="parentRef" type="BaseResourceType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Weak reference to a parent content group. This content group is not necessary existing.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="images" type="ImageSetType" minOccurs="0" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Set of images for this event and associated metadata</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="preferenceSet" type="preferenceSetType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>Set of images for this event and associated metadata</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="type" type="UnifiedContentGroupEnumType" use="required">
                    <xs:annotation>
                        <xs:documentation>The type of content group</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- content group type enum -->
    <xs:simpleType name="UnifiedContentGroupEnumType">
        <xs:annotation>
            <xs:documentation>enumeration characterizing a content group type</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="series" />
            <xs:enumeration value="season" />
            <xs:enumeration value="movieGroup" />
            <xs:enumeration value="collection" />
            <xs:enumeration value="channel" />
        </xs:restriction>
    </xs:simpleType>


    <xs:complexType name="UnifiedEditorialContentType">
        <xs:complexContent>
            <xs:extension base="BaseResourceTypeWithMetadata">
                <xs:sequence>
                    <xs:element name="period" type="PeriodType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>This period allow to specify the start and end date of the event</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="referenceAsset" type="UnifiedReferenceAssetType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>A reference asset of the editorial content. All reference asset type must be unique per editorial content.
                                If a reference asset with the specified type does not exist,
                                it will be created. Otherwise it will be updated.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="images" type="ImageSetType" minOccurs="0" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Set of images for this event and associated metadata</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="persons" type="PersonSetType" minOccurs="0" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Set of persons for this content and associated metadata</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="parentalRatings" type="ParentalRatingSetType" minOccurs="0" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Parental ratings used to decide suitability for certain audiences based on its content</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="contentGroupRef" type="BaseResourceType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Weak reference to an external content group (series or other). This content group is not necessary existing.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="seasonRef" type="BaseResourceType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Refers to the season content group to which content belongs</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="seriesRef" type="BaseResourceType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Refers to the series content group to which content belongs</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="contentGroupRefSet" type="UnifiedContentGroupRefSetType" minOccurs="0" maxOccurs="1">
                        <xs:annotation>
                            <xs:documentation>Weak reference to an external content group (Other than series and season. This content group is not necessary existing).</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="contentType" type="UnifiedContentTypeEnumType">
                    <xs:annotation>
                        <xs:documentation>The type of editorial content.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="profileId">
                    <xs:annotation>
                        <xs:documentation>Weak reference to the id of the profile characterizing the technical content</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="profileIdSet">
                    <xs:annotation>
                        <xs:documentation>Weak reference to the idSet of the profile characterizing the editorial content</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="UnifiedContentGroupRefSetType">
        <xs:annotation>
            <xs:documentation>Set of content groups to which content is linked (content groups other than series,season,movieGroup)</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="contentGroupRef" type="BaseResourceType" minOccurs="0" maxOccurs="unbounded">
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="nodeRefSetType">
        <xs:annotation>
            <xs:documentation>Set of node to which content is linked</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="nodeRef" type="BaseResourceType" minOccurs="0" maxOccurs="unbounded">
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <!-- content type enum -->
    <xs:simpleType name="UnifiedContentTypeEnumType">
        <xs:annotation>
            <xs:documentation>enumeration characterizing a content type</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="movie" />
            <xs:enumeration value="trailer" />
            <xs:enumeration value="unknown"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="UnifiedTechnicalContentType">
        <xs:complexContent>
            <xs:extension base="BaseResourceTypeWithMetadata">
                <xs:sequence>
                    <xs:element name="period" type="PeriodType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>This period allow to specify the start and end date of the event</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="playableAsset" type="UnifiedPlayableAssetType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>The playable asset of the technical content.
                                If the playable asset does not exist, it will be created. Otherwise it will be updated.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="assets" type="UnifiedSupplementaryAssetType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>List of supplementary asset of the technical content.If the supplementary asset does not exist, it will be created. Otherwise it will be updated.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="editorialContentRef" type="BaseResourceType">
                        <xs:annotation>
                            <xs:documentation>Reference to the editorial content containing this technical content</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="securityInfo" type="SecurityInfoType" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Element describing a set of data related to a specific security device (Cas, Drm).</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="timeShifting" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Data relative to the TimeShifting feature</xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                            <xs:attribute name="shortTermCatchUpSupport" type="xs:boolean" use="optional">
                                <xs:annotation>
                                    <xs:documentation>Indicate if the Short Term Catch-Up feature is activated for this technical content.</xs:documentation>
                                </xs:annotation>
                            </xs:attribute>
                            <xs:attribute name="longTermCatchUpSupport" type="xs:boolean" use="optional">
                                <xs:annotation>
                                    <xs:documentation>Indicate if the Long Term Catch-Up feature is activated for this technical content.</xs:documentation>
                                </xs:annotation>
                            </xs:attribute>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="rights" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>Set of properties describing the consumption capabilities of a content
                            </xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                            <xs:attribute name="storageAllowed" type="xs:boolean" use="optional">
                                <xs:annotation>
                                    <xs:documentation>Allow a client to download the Content</xs:documentation>
                                </xs:annotation>
                            </xs:attribute>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="profileId">
                    <xs:annotation>
                        <xs:documentation>Weak reference to the id of the profile characterizing the technical content</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="profileIdSet">
                    <xs:annotation>
                        <xs:documentation>Weak reference to the idSet of the profile characterizing the technical content</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="UnifiedPlayableAssetType">
        <xs:annotation>
            <xs:documentation>type describing a playable asset</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="metadataSet" type="MetadataSetNoLocaleType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>The Metadata Set Type which defines a specific set of metadata for the locale
                        "none"
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="assetDeviceLocation" type="UnifiedAssetDeviceLocationType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>Also called ADL, it is a set of data describing the asset location on a specific
                        storage device.
                        All ADL type must be unique per asset.
                        If an ADL with the specified type does not exist, it will be created. Otherwise it will be
                        updated.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional">
            <xs:annotation>
                <xs:documentation>It can be an id using the schema "id" (e.g. id:de305d54-75b4) or a path relative to
                    the ADL using the schema "relpath" (e.g. relpath://folder/; relpath://folder/mib.m3u8 or
                    relpath:mib.m3u8)
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- Supplementary  Asset Definition -->
    <xs:complexType name="UnifiedSupplementaryAssetType">
        <xs:annotation>
            <xs:documentation>type describing a Supplementary or Supportive asset other than Playable or reference
                asset
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="metadataSet" type="MetadataSetNoLocaleType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>The Metadata Set Type which defines a specific set of metadata for the locale
                        "none"
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="assetDeviceLocation" type="UnifiedAssetDeviceLocationType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>Also called ADL, it is a set of data describing the asset location on a specific
                        storage device.All ADL type must be unique per asset.If an ADL with the specified type does not
                        exist, it will be created. Otherwise it will be updated.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="required">
            <xs:annotation>
                <xs:documentation>It can be an id using the schema "id" (e.g. id:de305d54-75b4) or a path relative to
                    the ADL using the schema "relpath" (e.g. relpath://folder/; relpath://folder/mib.m3u8 or
                    relpath:mib.m3u8)
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="type" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>It is a generic keyword allowing to identify the type of Supplementary asset (e.g. HD
                    or SD)
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:complexType name="UnifiedReferenceAssetType">
        <xs:annotation>
            <xs:documentation>type describing a reference asset.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="metadataSet" type="MetadataSetNoLocaleType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>The Metadata Set Type which defines a specific set of metadata for the locale "none"</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="assetDeviceLocation" type="UnifiedAssetDeviceLocationType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>Also called ADL, it is a set of data describing the asset location on a specific storage device.
                        All ADL type must be unique per asset.
                        If an ADL with the specified type does
                        not exist, it will be created. Otherwise it will be updated.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="optional">
            <xs:annotation>
                <xs:documentation>It can be an id using the schema "id" (e.g. id:de305d54-75b4) or a path relative to the ADL using the schema "relpath" (e.g. relpath://folder/; relpath://folder/mib.m3u8 or
                    relpath:mib.m3u8)
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="type" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>It is a generic keyword allowing to identify the type of reference asset (e.g. HD or SD)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="UnifiedAssetDeviceLocationType">
        <xs:annotation>
            <xs:documentation>Also called ADL, it is a type describing the asset location on a specific storage device.</xs:documentation>
        </xs:annotation>
        <xs:attribute name="relativePath" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>Relative path (e.g. folder/ or ./folder1/folder2/) against the storage device accesspoint. It can be empty.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="storageDeviceId" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>id of the storage device where the asset is located. this storage device will be accessed through one of its access points</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="type" type="UnifiedAssetDeviceLocationEnumType" use="required">
            <xs:annotation>
                <xs:documentation>enumeration characterizing an asset device location</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <!--Assets definitions -->
    <xs:simpleType name="UnifiedAssetDeviceLocationEnumType">
        <xs:annotation>
            <xs:documentation>enumeration characterizing an asset device location</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="source" />
            <xs:enumeration value="destination" />
            <xs:enumeration value="archive" />
            <xs:enumeration value="other" />
        </xs:restriction>
    </xs:simpleType>

</xs:schema>
