<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="webforms">
        <xs:annotation>
            <xs:documentation>
                The root node for webforms configuration.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:all>
                <xs:element name="field_types" type="field_typesType" minOccurs="0"/>
            </xs:all>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="field_typesType">
        <xs:annotation>
            <xs:documentation>
                The containing node for a list of field types.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence maxOccurs="unbounded">
            <xs:element name="type" type="typeType"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="typeType">
        <xs:annotation>
            <xs:documentation>
                The definition of a field type.
            </xs:documentation>
        </xs:annotation>
        <xs:all>
            <xs:element name="label" type="xs:string"/>
            <xs:element name="model" type="xs:string"/>
            <xs:element name="category" type="xs:string" minOccurs="0"/>
            <xs:element name="value" type="xs:string" minOccurs="0"/>
            <xs:element name="logic" type="xs:boolean" minOccurs="0"/>
            <xs:element name="attributes" type="typeAttributes" minOccurs="0"/>
        </xs:all>
        <xs:attribute name="id" type="xs:ID" use="required"/>
        <xs:attribute name="order" type="xs:integer" use="required"/>
    </xs:complexType>

    <xs:complexType name="typeAttributes">
        <xs:annotation>
            <xs:documentation>
                The containing node for a list of field type attributes.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence maxOccurs="unbounded">
            <xs:element name="attribute" type="typeAttribute"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="typeAttribute">
        <xs:annotation>
            <xs:documentation>
                The definition of a type attribute.
            </xs:documentation>
        </xs:annotation>
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>

</xs:schema>
