<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://edu.kde.org/game" 
xmlns:tns="http://edu.kde.org/game" 
elementFormDefault="qualified">

    <xsd:complexType name="Sound">
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="missed"></xsd:enumeration>
                    <xsd:enumeration value="found"></xsd:enumeration>
                    <xsd:enumeration value="turn"></xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="src" type="xsd:string"></xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="Image">
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="back"></xsd:enumeration>
                    <xsd:enumeration value="trasparent_back"></xsd:enumeration>
                    <xsd:enumeration value="background"></xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="src" type="xsd:string"></xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="Main">
        <xsd:attribute name="type" use="required">
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="image"></xsd:enumeration>
                    <xsd:enumeration value="sound"></xsd:enumeration>
                    <xsd:enumeration value="word"></xsd:enumeration>
                    <xsd:enumeration value="video"></xsd:enumeration>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="Description">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
              <xsd:attribute name="lang" type="xsd:string" />
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="el_file">
        <xsd:attribute name="src" type="xsd:string" use="required" />
        <xsd:attribute name="lang" type="xsd:string" use="optional"></xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="el_word">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute name="lang" type="xsd:string" use="optional"></xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

    <xsd:complexType name="Element">
        <xsd:sequence>
            <xsd:element name="image" type="tns:el_file" minOccurs="0" maxOccurs="unbounded"></xsd:element>
            <xsd:element name="sound" type="tns:el_file" minOccurs="0" maxOccurs="unbounded"></xsd:element>
            <xsd:element name="pfound" type="tns:el_file" minOccurs="0" maxOccurs="unbounded"></xsd:element>
            <xsd:element name="video" type="tns:el_file" minOccurs="0" maxOccurs="unbounded"></xsd:element>
            <xsd:element name="word" type="tns:el_word" minOccurs="0" maxOccurs="unbounded"></xsd:element>
        </xsd:sequence>
    </xsd:complexType>

<xsd:element name="pairs">
  <xsd:complexType>
    <xsd:sequence>
        <xsd:element name="title" type="xsd:string" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="description" type="tns:Description" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="author" type="xsd:string" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="date" type="xsd:string" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="version" type="xsd:string" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="sound" type="tns:Sound" maxOccurs="3" minOccurs="0"/>
        <xsd:element name="image" type="tns:Image" maxOccurs="3" minOccurs="0"/>
        <xsd:element name="main" type="tns:Main" maxOccurs="1" minOccurs="1"/>
        <xsd:element name="element" type="tns:Element" maxOccurs="unbounded" minOccurs="1"></xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>
</xsd:schema>

