<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.0">


<!--RootNode: GameApp-->
    <xsd:element name="GameApp">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="AppInfo"     type="AppInfo"          minOccurs="1" maxOccurs="1" />
                <xsd:element name="Shardlet"    type="ShardletConfig"   minOccurs="1" maxOccurs="unbounded" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
        
        
<!--Type defs-->
    <!--AppInfo-->
    <xsd:complexType name="AppInfo">
        <xsd:sequence>
            <xsd:element name="DisplayName"     type="xsd:string"       minOccurs="1" maxOccurs="1" />
            <xsd:element name="Description"     type="xsd:string"       minOccurs="1" maxOccurs="1" />
            <!--Startup: determines whether the app should be loaded at the start of the container-->
            <xsd:element name="Startup"         type="Start"            minOccurs="0" maxOccurs="1" default="WhenRequested" />
            <!--HeartBeat: determines the milliseconds time intervall that the app will recieve HeartBeatsEvent's-->
            <xsd:element name="HeartBeat"       type="xsd:unsignedInt"  minOccurs="0" maxOccurs="1" default="500" />
            <xsd:element name="InitParam"       type="InitParam"        minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>


    <!--Start-->
    <xsd:simpleType name="Start">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="WhenContainerStartupFinished" />
            <xsd:enumeration value="WhenRequested" />
        </xsd:restriction>
    </xsd:simpleType>
        

    <!--ShardletConfig-->
    <xsd:complexType name="ShardletConfig">
        <xsd:sequence>
            <xsd:element name="InitParam" type="InitParam" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="name"  type="xsd:string" use="required" />
        <xsd:attribute name="class" type="xsd:string" use="required" />
    </xsd:complexType>

    
    <!--InitParam-->
    <xsd:complexType name="InitParam">
        <xsd:attribute name="name"  type="xsd:string" use="required" />
        <xsd:attribute name="value" type="xsd:string" use="required" />
    </xsd:complexType>

</xsd:schema>