<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cafx="http://www.cffex.com.cn/tech/cafx/xsd">
    <xs:import namespace="http://www.cffex.com.cn/tech/cafx/xsd" schemaLocation="CommonTypes.xsd"/>
    <xs:element name="forms">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="form" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="version" type="cafx:FrameworkVersion" use="required">
                <xs:annotation>
                    <xs:documentation>配置文件对应的框架版本号</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="form">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="panel"/>
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required"/>
            <xs:attribute name="class" type="xs:string" use="required"/>
            <xs:attribute name="caption" type="xs:string" use="required"/>
            <xs:attribute name="controller" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="panel">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="panelGroup" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>面板的名称，用于在 Panels.xml 中进行关联。</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="class" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>静态化：面板的类名。
动态化：面板的基类类名。</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="caption" type="xs:string" use="required"/>
            <xs:attribute name="bound" type="xs:string" use="required"/>
            <xs:attribute name="dock" type="xs:string" use="required"/>
            <xs:attribute name="tabPosition" type="xs:string"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="control">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="required"/>
            <xs:attribute name="class" type="xs:string" use="required"/>
            <xs:attribute name="caption" type="xs:string" use="required"/>
            <xs:attribute name="bound" type="xs:string" use="required"/>
            <xs:attribute name="dock" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    <xs:group name="panelGroup">
        <xs:sequence>
            <xs:element ref="panel" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="control" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>
</xs:schema>
