<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ekmPlugin="http://www.ansys.com/ekm/plugin"
    targetNamespace="http://www.ansys.com/ekm/plugin">

    <xsd:complexType name="Type">
        <xsd:attribute name="name" type="xsd:string" use="required" />
    </xsd:complexType>

    <xsd:complexType name="Types">
        <xsd:sequence minOccurs="0" maxOccurs="unbounded">
            <xsd:element name="type" type="ekmPlugin:Type"/>
        </xsd:sequence>
    </xsd:complexType>   
        
    <xsd:complexType name="Parameters">
        <xsd:sequence>
            <xsd:element name="param" minOccurs="0"
                maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:attribute name="name" type="xsd:string"
                        use="required" />
                    <xsd:attribute name="value" type="xsd:string"
                        use="required" />
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    
    <xsd:complexType name="Component">
        <xsd:sequence>
            <xsd:element name="componentSettings" type="ekmPlugin:Parameters"
                minOccurs="0" />
        </xsd:sequence>
        <xsd:attribute name="interface" type="xsd:string"
            use="required">
        </xsd:attribute>
        <xsd:attribute name="class" type="xsd:string" use="required" />
    </xsd:complexType>

    <xsd:complexType name="PluginConfig">
        <xsd:sequence>
            <xsd:element name="component" type="ekmPlugin:Component"
                minOccurs="0" maxOccurs="unbounded" />
            <xsd:element name="types" type="ekmPlugin:Types"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
        <xsd:attribute name="load">
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="eager" />
                    <xsd:enumeration value="lazy" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="ui" type="xsd:boolean" use="required" />
        <xsd:attribute name="initializer" type="xsd:string" />
    </xsd:complexType>

    <xsd:element name="plugin" type="ekmPlugin:PluginConfig" />

</xsd:schema>