<?xml version='1.0' encoding='UTF-8'?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:pc1="http://www.amwa.tv/projects/rules/01/block/DM_Commercials_Promos_DomainSpecific/" xmlns:cmn="http://www.amwa.tv/projects/rules/01/block/DM_Common/" targetNamespace="http://www.amwa.tv/projects/rules/01/block/DM_Commercials_Promos_DomainSpecific/" elementFormDefault="qualified">

  <xs:import namespace="http://www.amwa.tv/projects/rules/01/block/DM_Common/" schemaLocation="DM_Common.xsd"/>

  <xs:element name="Commercials_Promos_DomainSpecific_DM">
    <xs:complexType>
      <xs:choice>
        <xs:sequence>
          <xs:element name="Commercial" type="pc1:Advert_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:sequence>
          <xs:element name="Sponsorship" type="pc1:Advert_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:sequence>
          <xs:element name="Infomercial" type="pc1:Advert_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:sequence>
          <xs:element name="Presentation_Event" type="pc1:Core_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:sequence>
          <xs:element name="Promotion" type="pc1:Core_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:sequence>
          <xs:element name="Music_Video" type="pc1:Music_Video_type" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="Core_type">
    <xs:sequence>
      <xs:element name="Brand" type="cmn:string127" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Commercial:"Fizzy Frogs" / Promotion:"Channel 6" / PresentationEvent:"5Twelve"
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Campaign" type="cmn:string127" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Commercial:"Easter Hunt" / Promotion:"Wildlife Uncovered" / PresentationEvent:"Spring 2018 re-brand"
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Title" type="cmn:string127" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Commercial:"20sec Weekend a.m." / Promotion:"Episode 2" / PresentationEvent:"Ident Description"
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Version" type="cmn:string127" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Commercial:"Pre-Watershed" / Promotion:"Tonight - 20s" / PresentationEvent:"HD with 5.1 audio"
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Manifestation" type="cmn:string127" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Commercial:"for Mobile Phone Delivery" / Promotion:"Clean / Nations" / PresentationEvent:"End credit squeeze / sting"
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Originator" type="cmn:string127" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            e.g. Production House
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Supplier" type="cmn:string127" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            Not to be confused with Originator - Supplier here means the physical source of the file when delivered to the broadcaster
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Subtitle_Language" type="cmn:BCP47_language_tag" minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            A code to identify the language of closed captions - optional since IMSC1.1 subtitles carry the language tag in their own document. Useful for OP-47 subtitles if supported.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="Advert_type">
    <xs:complexContent>
      <xs:extension base="pc1:Core_type">
        <xs:sequence>
          <xs:element name="Advertiser" type="cmn:string127" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">
                The advertising agency responsible for this clip
              </xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="Music_Video_type">
    <xs:sequence>
      <xs:element name="Music_Title" type="cmn:string127" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Label" type="cmn:string127" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Artist" type="cmn:string127" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Plugger" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Production_Year" type="xs:gYear" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Release_Date" type="xs:date" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Embargo_Date" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Publisher" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Composer" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Writer" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Video_Director" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Description" type="cmn:string127" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Explicit_Lyrics" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

</xs:schema>
