<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:simpleType name="CHANNEL">
        <xsd:restriction base='xsd:string'>
            <xsd:pattern value="[.*]{1,255}"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="BVD_ID_OPT">
        <xsd:restriction base='xsd:string'>
	    <!-- DvD ID : FR382865624 -->
            <xsd:pattern value=''/>
            <xsd:pattern value='\c{2,4}\d{1,10}'/>
        </xsd:restriction>
    </xsd:simpleType>


    <xsd:simpleType name="GENRE">
        <xsd:restriction base='xsd:string'>
            <xsd:pattern value='[A-Za-z0-9 \-_]{1,8}'/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="URL">
        <xsd:restriction base='xsd:string'>
            <!-- URL http://-->
            <xsd:pattern value='(http://.*)?'/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="LANG">
        <xsd:restriction base='xsd:string'>
            <xsd:maxLength value='3'/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:element name="channels">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="channel" minOccurs="1" maxOccurs="unbounded">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="CHANNEL" type="CHANNEL"/>
                            <xsd:element name="COMPANY" type="xsd:string"/>
                            <xsd:element name="BVD_ID_Groupe_1" type="BVD_ID_OPT"/>
                            <xsd:element name="BVD_ID_Groupe_2" type="BVD_ID_OPT"/>
                            <xsd:element name="GENRE" type="GENRE"/>
                            <xsd:element name="URL" type="URL"/>
                            <xsd:element name="OTHER_URL" type="xsd:string"/>
                            <xsd:element name="COMPETENT_AUTHORITY" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
     </xsd:complexType>
  </xsd:element>
</xsd:schema>
