<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2008-2013 Haulmont. All rights reserved.
  ~ Use is subject to license terms, see http://www.cuba-platform.com/license for details.
  -->

<xs:schema targetNamespace="http://schemas.haulmont.com/cuba/5.2/window.xsd"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schemas.haulmont.com/cuba/5.2/window.xsd"
        xmlns:views="http://schemas.haulmont.com/cuba/5.2/view.xsd"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

    <xs:import namespace="http://schemas.haulmont.com/cuba/5.2/view.xsd"
               schemaLocation="http://schemas.haulmont.com/cuba/5.2/view.xsd"/>

    <!-- Enums -->

    <xs:simpleType name="operatorEnum">
        <xs:restriction base="xs:string">
            <xs:enumeration value="STARTS_WITH"/>
            <xs:enumeration value="ENDS_WITH"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="filterMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NO"/>
            <xs:enumeration value="STARTS_WITH"/>
            <xs:enumeration value="CONTAINS"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="datatypeEnum">
        <xs:restriction base="xs:string">
            <xs:enumeration value="decimal"/>
            <xs:enumeration value="boolean"/>
            <xs:enumeration value="byte array"/>
            <xs:enumeration value="date"/>
            <xs:enumeration value="double"/>
            <xs:enumeration value="int"/>
            <xs:enumeration value="long"/>
            <xs:enumeration value="string"/>
            <xs:enumeration value="uuid"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="dateFieldResolution">
        <xs:restriction base="xs:string">
            <xs:enumeration value="SEC"/>
            <xs:enumeration value="MIN"/>
            <xs:enumeration value="HOUR"/>
            <xs:enumeration value="DAY"/>
            <xs:enumeration value="MONTH"/>
            <xs:enumeration value="YEAR"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="tokenListType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="LOOKUP"/>
            <xs:enumeration value="PICKER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="tokenListPosition">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP"/>
            <xs:enumeration value="BOTTOM"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="aggregation">
        <xs:restriction base="xs:string">
            <xs:enumeration value="SUM"/>
            <xs:enumeration value="COUNT"/>
            <xs:enumeration value="AVG"/>
            <xs:enumeration value="MIN"/>
            <xs:enumeration value="MAX"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="componentSize">
        <xs:union>
            <xs:simpleType>
                <xs:restriction base="xs:string"/>
            </xs:simpleType>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="AUTO"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:union>
    </xs:simpleType>

    <xs:simpleType name="orientation">
        <xs:restriction base="xs:string">
            <xs:enumeration value="horizontal"/>
            <xs:enumeration value="vertical"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="scrollBars">
        <xs:restriction base="xs:string">
            <xs:enumeration value="horizontal"/>
            <xs:enumeration value="vertical"/>
            <xs:enumeration value="both"/>
            <xs:enumeration value="none"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="align">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP_RIGHT"/>
            <xs:enumeration value="TOP_LEFT"/>
            <xs:enumeration value="TOP_CENTER"/>
            <xs:enumeration value="MIDDLE_RIGHT"/>
            <xs:enumeration value="MIDDLE_LEFT"/>
            <xs:enumeration value="MIDDLE_CENTER"/>
            <xs:enumeration value="BOTTOM_RIGHT"/>
            <xs:enumeration value="BOTTOM_LEFT"/>
            <xs:enumeration value="BOTTOM_CENTER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="headerMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NONE"/>
            <xs:enumeration value="ICON"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="openType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NEW_TAB"/>
            <xs:enumeration value="THIS_TAB"/>
            <xs:enumeration value="DIALOG"/>
            <xs:enumeration value="NEW_WINDOW"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="sourceCodeEditorMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Java"/>
            <xs:enumeration value="HTML"/>
            <xs:enumeration value="XML"/>
            <xs:enumeration value="Groovy"/>
            <xs:enumeration value="SQL"/>
            <xs:enumeration value="JavaScript"/>
            <xs:enumeration value="Text"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="refreshMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ALWAYS"/>
            <xs:enumeration value="NEVER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="borderMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="visible"/>
            <xs:enumeration value="hidden"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="fieldGroupCaptionAlignment">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP"/>
            <xs:enumeration value="LEFT"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="maskedFieldValueMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="masked"/>
            <xs:enumeration value="clear"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- Interfaces -->

    <xs:attributeGroup name="hasId">
        <xs:attribute name="id" type="xs:string"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresId">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSize">
        <xs:attribute name="width" type="componentSize"/>
        <xs:attribute name="height" type="componentSize"/>
        <xs:attribute name="colspan" type="xs:integer"/>
        <xs:attribute name="rowspan" type="xs:integer"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasWidthProp">
        <xs:attribute name="width" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasVisibility">
        <xs:attribute name="visible" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasAlign">
        <xs:attribute name="align" type="align"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasStyle">
        <xs:attribute name="stylename" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSpacingMargin">
        <xs:attribute name="spacing" type="xs:boolean"/>
        <xs:attribute name="margin" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSpacing">
        <xs:attribute name="spacing" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasExpand">
        <xs:attribute name="expand" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEditState">
        <xs:attribute name="editable" type="xs:boolean"/>
        <xs:attribute name="enable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEditable">
        <xs:attribute name="editable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEnableProp">
        <xs:attribute name="enable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatasource">
        <xs:attribute name="datasource" type="xs:string"/>
        <xs:attribute name="property" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresDatasource">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatasourceProp">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasValue">
        <xs:attribute name="value" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaption">
        <xs:attribute name="caption" type="xs:string" default="msg://"/>
        <xs:attribute name="description" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresCaption">
        <xs:attribute name="caption" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaptionProp">
        <xs:attribute name="caption" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasRequirements">
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="requiredMessage" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatatype">
        <xs:attribute name="datatype" type="datatypeEnum"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasOptions">
        <xs:attribute name="optionsDatasource" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaptionSource">
        <xs:attribute name="captionProperty" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isTableComponent">
        <xs:attribute name="multiselect" type="xs:boolean"/>
        <xs:attribute name="sortable" type="xs:boolean"/>
        <xs:attribute name="reorderingAllowed" type="xs:boolean"/>
        <xs:attribute name="columnControlVisible" type="xs:boolean"/>

        <xs:attribute name="aggregatable" type="xs:boolean"/>
        <xs:attribute name="presentations" type="xs:boolean"/>
        <xs:attribute name="allowPopupMenu" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isLayoutComponent">
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasSpacingMargin"/>

        <xs:attribute name="expand" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isDatasource">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="view" type="xs:string"/>
        <xs:attribute name="allowCommit" type="xs:boolean"/>
        <xs:attribute name="datasourceClass" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isCollectionDatasource">
        <xs:attributeGroup ref="isDatasource"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isNestedDatasource">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="property" type="xs:string" use="required"/>
        <xs:attribute name="datasourceClass" type="xs:string"/>
        <xs:attribute name="allowCommit" type="xs:boolean"/>
    </xs:attributeGroup>

    <!-- Utils -->

    <xs:complexType name="formatterType">
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="format" type="xs:string"/>
        <xs:attribute name="type" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="validatorType" mixed="true">
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="message" type="xs:string"/>
        <xs:attribute name="script" type="xs:string"/>
        <xs:attribute name="onlyPositive" type="xs:boolean"/>
    </xs:complexType>

    <xs:complexType name="tableRowsType">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
        <xs:attribute name="headerMode" type="headerMode"/>
    </xs:complexType>

    <xs:complexType name="tableColumnsList">
        <xs:sequence>
            <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="groupTableColumnsType">
        <xs:sequence>
            <xs:element name="group" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="accessControlAccessType" mixed="true">
        <xs:sequence>
            <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType mixed="true">
                    <xs:attribute name="name" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="script" type="xs:string"/>
        <xs:attribute name="property" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="companionType">
        <xs:attribute name="class" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="filterType">
        <xs:sequence>
            <xs:element name="c" type="filterClauseType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="and" type="filterLogicalType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="filterClauseType" mixed="true">
        <xs:attribute name="join" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="filterLogicalType">
        <xs:sequence>
            <xs:element name="c" type="filterClauseType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="and" type="filterLogicalType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="or" type="filterLogicalType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="frameAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="icon" type="xs:string"/>
        <xs:attribute name="invoke" type="xs:string"/>
        <xs:attribute name="shortcut" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="componentAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="openType" type="openType"/>
        <xs:attribute name="icon" type="xs:string"/>
        <xs:attribute name="trackSelection" type="xs:boolean"/>
        <xs:attribute name="invoke" type="xs:string"/>
        <xs:attribute name="shortcut" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="popupButtonAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaptionProp"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="invoke" type="xs:string"/>
    </xs:complexType>

    <!-- Components -->

    <!-- Label -->
    <xs:complexType name="labelComponent">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>

        <xs:attributeGroup ref="hasDatasource"/>
        <xs:attributeGroup ref="hasValue"/>
    </xs:complexType>

    <!-- Link -->
    <xs:complexType name="linkComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attribute name="url" type="xs:anyURI"/>
        <xs:attribute name="target" type="xs:string"/>
    </xs:complexType>

    <!-- CheckBox -->
    <xs:complexType name="checkBoxComponent">
        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditable"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasSize"/>

        <xs:attributeGroup ref="hasDatasource"/>
    </xs:complexType>

    <!-- BaseField -->
    <xs:complexType name="baseFieldComponent">
        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasRequirements"/>

        <xs:attributeGroup ref="hasDatasource"/>
    </xs:complexType>

    <!-- BaseTextComponent -->
    <xs:complexType name="baseTextComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="unbounded" type="validatorType"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextField -->
    <xs:complexType name="textFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:sequence>
                    <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasDatatype"/>

                <xs:attribute name="maxLength" type="xs:int"/>
                <xs:attribute name="trim" type="xs:boolean"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextArea -->
    <xs:complexType name="textAreaComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="cols" type="xs:int"/>
                <xs:attribute name="rows" type="xs:int"/>

                <xs:attribute name="maxLength" type="xs:int"/>
                <xs:attribute name="resizable" type="xs:boolean"/>
                <xs:attribute name="trim" type="xs:boolean"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextArea -->
    <xs:complexType name="sourceCodeEditorComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:attribute name="mode" type="sourceCodeEditorMode"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- MaskedField -->
    <xs:complexType name="maskedFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="mask" type="xs:string" use="required"/>
                <xs:attribute name="valueMode" type="maskedFieldValueMode"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="passwordFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="maxLength" type="xs:int"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- RichTextArea -->
    <xs:complexType name="richTextAreaComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent"/>
        </xs:complexContent>
    </xs:complexType>

    <!-- DateField -->
    <xs:complexType name="dateFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attribute name="resolution" type="dateFieldResolution"/>
                <xs:attribute name="dateFormat" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TimeField -->
    <xs:complexType name="timeFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attribute name="showSeconds" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Progress bar -->
    <xs:complexType name="progressBarComponent">
        <xs:attributeGroup ref="hasId"/>
        <!--<xs:attributeGroup ref="hasCaption"/>-->
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attribute name="indeterminate" type="xs:string"/>
    </xs:complexType>

    <!-- LookupField-->
    <xs:complexType name="lookupFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attributeGroup ref="hasOptions"/>
                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="filterMode" type="filterMode"/>
                <xs:attribute name="nullName" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- SearchField-->
    <xs:complexType name="searchFieldComponent">
        <xs:complexContent>
            <xs:extension base="lookupFieldComponent">
                <xs:attribute name="minSearchStringLength" type="xs:integer"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- PickerField -->
    <xs:complexType name="pickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                    <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="metaClass" type="xs:string"/>
                <xs:attribute name="lookupScreen" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- LookupPickerField -->
    <xs:complexType name="lookupPickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                    <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasOptions"/>
                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="filterMode" type="filterMode"/>
                <xs:attribute name="nullName" type="xs:string"/>
                <xs:attribute name="metaClass" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="searchPickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="lookupPickerFieldComponent">
                <xs:attribute name="minSearchStringLength" type="xs:integer"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- OptionsGroup -->
    <xs:complexType name="optionsGroupComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attributeGroup ref="hasCaptionSource"/>
                <xs:attributeGroup ref="hasOptions"/>

                <xs:attribute name="multiselect" type="xs:boolean"/>
                <xs:attribute name="orientation" default="vertical" type="orientation"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- FileUploadField -->
    <xs:complexType name="uploadComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEnableProp"/>
    </xs:complexType>

    <!-- FileMultiUploadField -->
    <xs:complexType name="multiuploadComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEnableProp"/>
    </xs:complexType>

    <!-- Tree -->
    <xs:complexType name="treeComponent">
        <xs:sequence>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="treechildren" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:attributeGroup ref="hasCaptionSource"/>
                    <xs:attribute name="datasource" type="xs:string" use="required"/>
                    <xs:attribute name="hierarchyProperty" type="xs:string"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attribute name="multiselect" type="xs:boolean"/>
    </xs:complexType>

    <!-- Button -->
    <xs:complexType name="buttonComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attribute name="action" type="xs:string"/>
        <xs:attribute name="icon" type="xs:string"/>

        <xs:attribute name="invoke" type="xs:string"/>
    </xs:complexType>

    <!-- PopupButton -->
    <xs:complexType name="popupButtonComponent">
        <xs:sequence>
            <xs:element name="actions" nillable="true" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:choice minOccurs="1" maxOccurs="unbounded">
                            <xs:element name="action" type="popupButtonAction"/>
                        </xs:choice>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attribute name="icon" type="xs:string"/>
    </xs:complexType>

    <!-- ButtonsPanel -->
    <xs:complexType name="buttonsPanelComponent">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="button" minOccurs="0" maxOccurs="unbounded" type="buttonComponent"/>
                <xs:element name="popupButton" minOccurs="0" maxOccurs="unbounded" type="popupButtonComponent"/>
            </xs:choice>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasExpand"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="providerClass" type="xs:string"/>
        <xs:attribute name="alwaysVisible" type="xs:boolean"/>
    </xs:complexType>

    <!-- Table.Column -->
    <xs:complexType name="tableColumnComponent">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
            <xs:element name="editable" minOccurs="0" maxOccurs="1"/>
            <!--<xs:element name="calculatable" minOccurs="0" maxOccurs="1"/>-->
            <!--<xs:element name="aggregation" minOccurs="0" maxOccurs="1">-->
                <!--<xs:complexType>-->
                    <!--<xs:sequence>-->
                        <!--<xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>-->
                    <!--</xs:sequence>-->
                    <!--<xs:attribute name="type" type="aggregation" use="required"/>-->
                <!--</xs:complexType>-->
            <!--</xs:element>-->
            <xs:element name="visible" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>

        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasCaptionProp"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="clickAction" type="xs:string"/>
        <xs:attribute name="collapsed" type="xs:boolean"/>
        <xs:attribute name="maxTextLength" type="xs:integer"/>

        <!-- Additional attributes, use only for editable table -->
        <xs:attributeGroup ref="hasOptions"/>
        <xs:attributeGroup ref="hasEditable"/>
        <xs:attributeGroup ref="hasRequirements"/>
        <xs:attributeGroup ref="hasCaptionSource"/>
        <xs:attribute name="resolution" type="xs:string"/>
        <xs:attribute name="dateFormat" type="xs:string"/>
    </xs:complexType>

    <!-- Table -->
    <xs:complexType name="tableComponent">
        <xs:all>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="buttonsPanel" minOccurs="0" maxOccurs="1" type="buttonsPanelComponent"/>
            <xs:element name="rowsCount" minOccurs="0" maxOccurs="1">
                <xs:complexType/>
            </xs:element>
            <xs:element name="columns" minOccurs="1" maxOccurs="1" type="tableColumnsList"/>
            <xs:element name="rows" minOccurs="1" type="tableRowsType"/>
        </xs:all>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>

        <xs:attributeGroup ref="isTableComponent"/>
    </xs:complexType>

    <!-- GroupTable -->
    <xs:complexType name="groupTableComponent">
        <xs:all>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="buttonsPanel" minOccurs="0" maxOccurs="1" type="buttonsPanelComponent"/>
            <xs:element name="rowsCount" minOccurs="0" maxOccurs="1">
                <xs:complexType/>
            </xs:element>
            <xs:element name="columns" minOccurs="1" maxOccurs="1" type="groupTableColumnsType"/>
            <xs:element name="rows" minOccurs="1" type="tableRowsType"/>
        </xs:all>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>

        <xs:attributeGroup ref="isTableComponent"/>

        <xs:attribute name="fixedGrouping" type="xs:boolean"/>
    </xs:complexType>

    <!-- Filter -->
    <xs:complexType name="filterComponent">
        <xs:sequence>
            <xs:element name="properties" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:attribute name="include" type="xs:string" use="required"/>
                    <xs:attribute name="exclude" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="caption" type="xs:string"/>
                    <xs:attribute name="paramWhere" type="xs:string"/>
                    <xs:attribute name="paramView" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="custom" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType mixed="true">
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="caption" type="xs:string"/>
                    <xs:attribute name="paramClass" type="xs:string"/>
                    <xs:attribute name="inExpr" type="xs:boolean"/>
                    <xs:attribute name="join" type="xs:string"/>
                    <xs:attribute name="paramWhere" type="xs:string"/>
                    <xs:attribute name="paramView" type="xs:string"/>
                    <xs:attribute name="operatorType" type="operatorEnum"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="requiresDatasource"/>

        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="margin" type="xs:string"/>

        <xs:attribute name="applyTo" type="xs:string"/>
        <xs:attribute name="useMaxResults" type="xs:boolean"/>
        <xs:attribute name="manualApplyRequired" type="xs:boolean"/>
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="editable" type="xs:boolean"/>
        <xs:attribute name="folderActionsEnabled" type="xs:boolean"/>
    </xs:complexType>

    <!-- FieldGroup.FieldConfig -->
    <xs:complexType name="fieldGroupField">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
            <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
        </xs:sequence>

        <xs:attributeGroup ref="requiresId"/>

        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="requiredMessage" type="xs:string"/>
        <xs:attribute name="custom" type="xs:boolean"/>

        <xs:attribute name="datasource" type="xs:string"/>

        <xs:attribute name="resolution" type="xs:string"/>
        <xs:attribute name="dateFormat" type="xs:string"/>
        <xs:attribute name="maxLength" type="xs:int"/>

        <xs:attribute name="cols" type="xs:int"/>
        <xs:attribute name="rows" type="xs:int"/>

        <xs:attribute name="optionsDatasource" type="xs:string"/>
        <xs:attribute name="captionProperty" type="xs:string"/>
        <xs:attribute name="descriptionProperty" type="xs:string"/>
        <xs:attribute name="field" type="xs:string"/>
        <xs:attribute name="showSeconds" type="xs:string"/>
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="mask" type="xs:string"/>
        <xs:attribute name="valueMode" type="maskedFieldValueMode"/><commit_msg>Document "dateFormat" and "resolution" from table column XSD #PL-3571<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2008-2013 Haulmont. All rights reserved.
  ~ Use is subject to license terms, see http://www.cuba-platform.com/license for details.
  -->

<xs:schema targetNamespace="http://schemas.haulmont.com/cuba/5.2/window.xsd"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schemas.haulmont.com/cuba/5.2/window.xsd"
        xmlns:views="http://schemas.haulmont.com/cuba/5.2/view.xsd"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

    <xs:import namespace="http://schemas.haulmont.com/cuba/5.2/view.xsd"
               schemaLocation="http://schemas.haulmont.com/cuba/5.2/view.xsd"/>

    <!-- Enums -->

    <xs:simpleType name="operatorEnum">
        <xs:restriction base="xs:string">
            <xs:enumeration value="STARTS_WITH"/>
            <xs:enumeration value="ENDS_WITH"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="filterMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NO"/>
            <xs:enumeration value="STARTS_WITH"/>
            <xs:enumeration value="CONTAINS"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="datatypeEnum">
        <xs:restriction base="xs:string">
            <xs:enumeration value="decimal"/>
            <xs:enumeration value="boolean"/>
            <xs:enumeration value="byte array"/>
            <xs:enumeration value="date"/>
            <xs:enumeration value="double"/>
            <xs:enumeration value="int"/>
            <xs:enumeration value="long"/>
            <xs:enumeration value="string"/>
            <xs:enumeration value="uuid"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="dateFieldResolution">
        <xs:restriction base="xs:string">
            <xs:enumeration value="SEC"/>
            <xs:enumeration value="MIN"/>
            <xs:enumeration value="HOUR"/>
            <xs:enumeration value="DAY"/>
            <xs:enumeration value="MONTH"/>
            <xs:enumeration value="YEAR"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="tokenListType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="LOOKUP"/>
            <xs:enumeration value="PICKER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="tokenListPosition">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP"/>
            <xs:enumeration value="BOTTOM"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="aggregation">
        <xs:restriction base="xs:string">
            <xs:enumeration value="SUM"/>
            <xs:enumeration value="COUNT"/>
            <xs:enumeration value="AVG"/>
            <xs:enumeration value="MIN"/>
            <xs:enumeration value="MAX"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="componentSize">
        <xs:union>
            <xs:simpleType>
                <xs:restriction base="xs:string"/>
            </xs:simpleType>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="AUTO"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:union>
    </xs:simpleType>

    <xs:simpleType name="orientation">
        <xs:restriction base="xs:string">
            <xs:enumeration value="horizontal"/>
            <xs:enumeration value="vertical"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="scrollBars">
        <xs:restriction base="xs:string">
            <xs:enumeration value="horizontal"/>
            <xs:enumeration value="vertical"/>
            <xs:enumeration value="both"/>
            <xs:enumeration value="none"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="align">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP_RIGHT"/>
            <xs:enumeration value="TOP_LEFT"/>
            <xs:enumeration value="TOP_CENTER"/>
            <xs:enumeration value="MIDDLE_RIGHT"/>
            <xs:enumeration value="MIDDLE_LEFT"/>
            <xs:enumeration value="MIDDLE_CENTER"/>
            <xs:enumeration value="BOTTOM_RIGHT"/>
            <xs:enumeration value="BOTTOM_LEFT"/>
            <xs:enumeration value="BOTTOM_CENTER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="headerMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NONE"/>
            <xs:enumeration value="ICON"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="openType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="NEW_TAB"/>
            <xs:enumeration value="THIS_TAB"/>
            <xs:enumeration value="DIALOG"/>
            <xs:enumeration value="NEW_WINDOW"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="sourceCodeEditorMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Java"/>
            <xs:enumeration value="HTML"/>
            <xs:enumeration value="XML"/>
            <xs:enumeration value="Groovy"/>
            <xs:enumeration value="SQL"/>
            <xs:enumeration value="JavaScript"/>
            <xs:enumeration value="Text"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="refreshMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ALWAYS"/>
            <xs:enumeration value="NEVER"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="borderMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="visible"/>
            <xs:enumeration value="hidden"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="fieldGroupCaptionAlignment">
        <xs:restriction base="xs:string">
            <xs:enumeration value="TOP"/>
            <xs:enumeration value="LEFT"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="maskedFieldValueMode">
        <xs:restriction base="xs:string">
            <xs:enumeration value="masked"/>
            <xs:enumeration value="clear"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- Interfaces -->

    <xs:attributeGroup name="hasId">
        <xs:attribute name="id" type="xs:string"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresId">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSize">
        <xs:attribute name="width" type="componentSize"/>
        <xs:attribute name="height" type="componentSize"/>
        <xs:attribute name="colspan" type="xs:integer"/>
        <xs:attribute name="rowspan" type="xs:integer"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasWidthProp">
        <xs:attribute name="width" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasVisibility">
        <xs:attribute name="visible" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasAlign">
        <xs:attribute name="align" type="align"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasStyle">
        <xs:attribute name="stylename" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSpacingMargin">
        <xs:attribute name="spacing" type="xs:boolean"/>
        <xs:attribute name="margin" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasSpacing">
        <xs:attribute name="spacing" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasExpand">
        <xs:attribute name="expand" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEditState">
        <xs:attribute name="editable" type="xs:boolean"/>
        <xs:attribute name="enable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEditable">
        <xs:attribute name="editable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasEnableProp">
        <xs:attribute name="enable" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatasource">
        <xs:attribute name="datasource" type="xs:string"/>
        <xs:attribute name="property" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresDatasource">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatasourceProp">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasValue">
        <xs:attribute name="value" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaption">
        <xs:attribute name="caption" type="xs:string" default="msg://"/>
        <xs:attribute name="description" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="requiresCaption">
        <xs:attribute name="caption" type="xs:string" use="required"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaptionProp">
        <xs:attribute name="caption" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasRequirements">
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="requiredMessage" type="xs:string" default="msg://"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasDatatype">
        <xs:attribute name="datatype" type="datatypeEnum"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasOptions">
        <xs:attribute name="optionsDatasource" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="hasCaptionSource">
        <xs:attribute name="captionProperty" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isTableComponent">
        <xs:attribute name="multiselect" type="xs:boolean"/>
        <xs:attribute name="sortable" type="xs:boolean"/>
        <xs:attribute name="reorderingAllowed" type="xs:boolean"/>
        <xs:attribute name="columnControlVisible" type="xs:boolean"/>

        <xs:attribute name="aggregatable" type="xs:boolean"/>
        <xs:attribute name="presentations" type="xs:boolean"/>
        <xs:attribute name="allowPopupMenu" type="xs:boolean"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isLayoutComponent">
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasSpacingMargin"/>

        <xs:attribute name="expand" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isDatasource">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="view" type="xs:string"/>
        <xs:attribute name="allowCommit" type="xs:boolean"/>
        <xs:attribute name="datasourceClass" type="xs:string"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isCollectionDatasource">
        <xs:attributeGroup ref="isDatasource"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="isNestedDatasource">
        <xs:attribute name="id" type="xs:string" use="required"/>
        <xs:attribute name="property" type="xs:string" use="required"/>
        <xs:attribute name="datasourceClass" type="xs:string"/>
        <xs:attribute name="allowCommit" type="xs:boolean"/>
    </xs:attributeGroup>

    <!-- Utils -->

    <xs:complexType name="formatterType">
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="format" type="xs:string"/>
        <xs:attribute name="type" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="validatorType" mixed="true">
        <xs:attribute name="class" type="xs:string"/>
        <xs:attribute name="message" type="xs:string"/>
        <xs:attribute name="script" type="xs:string"/>
        <xs:attribute name="onlyPositive" type="xs:boolean"/>
    </xs:complexType>

    <xs:complexType name="tableRowsType">
        <xs:attribute name="datasource" type="xs:string" use="required"/>
        <xs:attribute name="headerMode" type="headerMode"/>
    </xs:complexType>

    <xs:complexType name="tableColumnsList">
        <xs:sequence>
            <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="groupTableColumnsType">
        <xs:sequence>
            <xs:element name="group" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="column" minOccurs="1" maxOccurs="unbounded" type="tableColumnComponent"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="accessControlAccessType" mixed="true">
        <xs:sequence>
            <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType mixed="true">
                    <xs:attribute name="name" use="required"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="script" type="xs:string"/>
        <xs:attribute name="property" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="companionType">
        <xs:attribute name="class" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="filterType">
        <xs:sequence>
            <xs:element name="c" type="filterClauseType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="and" type="filterLogicalType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="filterClauseType" mixed="true">
        <xs:attribute name="join" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="filterLogicalType">
        <xs:sequence>
            <xs:element name="c" type="filterClauseType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="and" type="filterLogicalType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="or" type="filterLogicalType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="frameAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="icon" type="xs:string"/>
        <xs:attribute name="invoke" type="xs:string"/>
        <xs:attribute name="shortcut" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="componentAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="openType" type="openType"/>
        <xs:attribute name="icon" type="xs:string"/>
        <xs:attribute name="trackSelection" type="xs:boolean"/>
        <xs:attribute name="invoke" type="xs:string"/>
        <xs:attribute name="shortcut" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="popupButtonAction">
        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasCaptionProp"/>
        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attribute name="invoke" type="xs:string"/>
    </xs:complexType>

    <!-- Components -->

    <!-- Label -->
    <xs:complexType name="labelComponent">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>

        <xs:attributeGroup ref="hasDatasource"/>
        <xs:attributeGroup ref="hasValue"/>
    </xs:complexType>

    <!-- Link -->
    <xs:complexType name="linkComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attribute name="url" type="xs:anyURI"/>
        <xs:attribute name="target" type="xs:string"/>
    </xs:complexType>

    <!-- CheckBox -->
    <xs:complexType name="checkBoxComponent">
        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditable"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasSize"/>

        <xs:attributeGroup ref="hasDatasource"/>
    </xs:complexType>

    <!-- BaseField -->
    <xs:complexType name="baseFieldComponent">
        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasRequirements"/>

        <xs:attributeGroup ref="hasDatasource"/>
    </xs:complexType>

    <!-- BaseTextComponent -->
    <xs:complexType name="baseTextComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="unbounded" type="validatorType"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextField -->
    <xs:complexType name="textFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:sequence>
                    <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasDatatype"/>

                <xs:attribute name="maxLength" type="xs:int"/>
                <xs:attribute name="trim" type="xs:boolean"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextArea -->
    <xs:complexType name="textAreaComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="cols" type="xs:int"/>
                <xs:attribute name="rows" type="xs:int"/>

                <xs:attribute name="maxLength" type="xs:int"/>
                <xs:attribute name="resizable" type="xs:boolean"/>
                <xs:attribute name="trim" type="xs:boolean"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TextArea -->
    <xs:complexType name="sourceCodeEditorComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:attribute name="mode" type="sourceCodeEditorMode"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- MaskedField -->
    <xs:complexType name="maskedFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="mask" type="xs:string" use="required"/>
                <xs:attribute name="valueMode" type="maskedFieldValueMode"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="passwordFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent">
                <xs:attribute name="maxLength" type="xs:int"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- RichTextArea -->
    <xs:complexType name="richTextAreaComponent">
        <xs:complexContent>
            <xs:extension base="baseTextComponent"/>
        </xs:complexContent>
    </xs:complexType>

    <!-- DateField -->
    <xs:complexType name="dateFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attribute name="resolution" type="dateFieldResolution"/>
                <xs:attribute name="dateFormat" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- TimeField -->
    <xs:complexType name="timeFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attribute name="showSeconds" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- Progress bar -->
    <xs:complexType name="progressBarComponent">
        <xs:attributeGroup ref="hasId"/>
        <!--<xs:attributeGroup ref="hasCaption"/>-->
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attribute name="indeterminate" type="xs:string"/>
    </xs:complexType>

    <!-- LookupField-->
    <xs:complexType name="lookupFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attributeGroup ref="hasOptions"/>
                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="filterMode" type="filterMode"/>
                <xs:attribute name="nullName" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- SearchField-->
    <xs:complexType name="searchFieldComponent">
        <xs:complexContent>
            <xs:extension base="lookupFieldComponent">
                <xs:attribute name="minSearchStringLength" type="xs:integer"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- PickerField -->
    <xs:complexType name="pickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                    <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="metaClass" type="xs:string"/>
                <xs:attribute name="lookupScreen" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- LookupPickerField -->
    <xs:complexType name="lookupPickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                    <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
                </xs:sequence>

                <xs:attributeGroup ref="hasOptions"/>
                <xs:attributeGroup ref="hasCaptionSource"/>

                <xs:attribute name="filterMode" type="filterMode"/>
                <xs:attribute name="nullName" type="xs:string"/>
                <xs:attribute name="metaClass" type="xs:string"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="searchPickerFieldComponent">
        <xs:complexContent>
            <xs:extension base="lookupPickerFieldComponent">
                <xs:attribute name="minSearchStringLength" type="xs:integer"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- OptionsGroup -->
    <xs:complexType name="optionsGroupComponent">
        <xs:complexContent>
            <xs:extension base="baseFieldComponent">
                <xs:sequence>
                    <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
                </xs:sequence>
                <xs:attributeGroup ref="hasCaptionSource"/>
                <xs:attributeGroup ref="hasOptions"/>

                <xs:attribute name="multiselect" type="xs:boolean"/>
                <xs:attribute name="orientation" default="vertical" type="orientation"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- FileUploadField -->
    <xs:complexType name="uploadComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEnableProp"/>
    </xs:complexType>

    <!-- FileMultiUploadField -->
    <xs:complexType name="multiuploadComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEnableProp"/>
    </xs:complexType>

    <!-- Tree -->
    <xs:complexType name="treeComponent">
        <xs:sequence>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="treechildren" minOccurs="1" maxOccurs="1">
                <xs:complexType>
                    <xs:attributeGroup ref="hasCaptionSource"/>
                    <xs:attribute name="datasource" type="xs:string" use="required"/>
                    <xs:attribute name="hierarchyProperty" type="xs:string"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasSize"/>
        <xs:attribute name="multiselect" type="xs:boolean"/>
    </xs:complexType>

    <!-- Button -->
    <xs:complexType name="buttonComponent">
        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attribute name="action" type="xs:string"/>
        <xs:attribute name="icon" type="xs:string"/>

        <xs:attribute name="invoke" type="xs:string"/>
    </xs:complexType>

    <!-- PopupButton -->
    <xs:complexType name="popupButtonComponent">
        <xs:sequence>
            <xs:element name="actions" nillable="true" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:sequence>
                        <xs:choice minOccurs="1" maxOccurs="unbounded">
                            <xs:element name="action" type="popupButtonAction"/>
                        </xs:choice>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="hasCaption"/>

        <xs:attributeGroup ref="hasEnableProp"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasAlign"/>

        <xs:attribute name="icon" type="xs:string"/>
    </xs:complexType>

    <!-- ButtonsPanel -->
    <xs:complexType name="buttonsPanelComponent">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="button" minOccurs="0" maxOccurs="unbounded" type="buttonComponent"/>
                <xs:element name="popupButton" minOccurs="0" maxOccurs="unbounded" type="popupButtonComponent"/>
            </xs:choice>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasExpand"/>
        <xs:attributeGroup ref="hasAlign"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="providerClass" type="xs:string"/>
        <xs:attribute name="alwaysVisible" type="xs:boolean"/>
    </xs:complexType>

    <!-- Table.Column -->
    <xs:complexType name="tableColumnComponent">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
            <xs:element name="editable" minOccurs="0" maxOccurs="1"/>
            <!--<xs:element name="calculatable" minOccurs="0" maxOccurs="1"/>-->
            <!--<xs:element name="aggregation" minOccurs="0" maxOccurs="1">-->
                <!--<xs:complexType>-->
                    <!--<xs:sequence>-->
                        <!--<xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>-->
                    <!--</xs:sequence>-->
                    <!--<xs:attribute name="type" type="aggregation" use="required"/>-->
                <!--</xs:complexType>-->
            <!--</xs:element>-->
            <xs:element name="visible" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>

        <xs:attributeGroup ref="requiresId"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasCaptionProp"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="clickAction" type="xs:string"/>
        <xs:attribute name="collapsed" type="xs:boolean"/>
        <xs:attribute name="maxTextLength" type="xs:integer"/>

        <!-- Additional attributes, use only for editable table -->
        <xs:attributeGroup ref="hasOptions"/>
        <xs:attributeGroup ref="hasEditable"/>
        <xs:attributeGroup ref="hasRequirements"/>
        <xs:attributeGroup ref="hasCaptionSource"/>
        <xs:attribute name="resolution" type="dateFieldResolution"/>
        <xs:attribute name="dateFormat" type="xs:string"/>
    </xs:complexType>

    <!-- Table -->
    <xs:complexType name="tableComponent">
        <xs:all>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="buttonsPanel" minOccurs="0" maxOccurs="1" type="buttonsPanelComponent"/>
            <xs:element name="rowsCount" minOccurs="0" maxOccurs="1">
                <xs:complexType/>
            </xs:element>
            <xs:element name="columns" minOccurs="1" maxOccurs="1" type="tableColumnsList"/>
            <xs:element name="rows" minOccurs="1" type="tableRowsType"/>
        </xs:all>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>

        <xs:attributeGroup ref="isTableComponent"/>
    </xs:complexType>

    <!-- GroupTable -->
    <xs:complexType name="groupTableComponent">
        <xs:all>
            <xs:element name="actions" minOccurs="0" maxOccurs="1" type="componentActions"/>
            <xs:element name="buttonsPanel" minOccurs="0" maxOccurs="1" type="buttonsPanelComponent"/>
            <xs:element name="rowsCount" minOccurs="0" maxOccurs="1">
                <xs:complexType/>
            </xs:element>
            <xs:element name="columns" minOccurs="1" maxOccurs="1" type="groupTableColumnsType"/>
            <xs:element name="rows" minOccurs="1" type="tableRowsType"/>
        </xs:all>

        <xs:attributeGroup ref="hasId"/>

        <xs:attributeGroup ref="hasSize"/>
        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>
        <xs:attributeGroup ref="hasEditState"/>

        <xs:attributeGroup ref="isTableComponent"/>

        <xs:attribute name="fixedGrouping" type="xs:boolean"/>
    </xs:complexType>

    <!-- Filter -->
    <xs:complexType name="filterComponent">
        <xs:sequence>
            <xs:element name="properties" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:attribute name="include" type="xs:string" use="required"/>
                    <xs:attribute name="exclude" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="caption" type="xs:string"/>
                    <xs:attribute name="paramWhere" type="xs:string"/>
                    <xs:attribute name="paramView" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="custom" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType mixed="true">
                    <xs:attribute name="name" type="xs:string" use="required"/>
                    <xs:attribute name="caption" type="xs:string"/>
                    <xs:attribute name="paramClass" type="xs:string"/>
                    <xs:attribute name="inExpr" type="xs:boolean"/>
                    <xs:attribute name="join" type="xs:string"/>
                    <xs:attribute name="paramWhere" type="xs:string"/>
                    <xs:attribute name="paramView" type="xs:string"/>
                    <xs:attribute name="operatorType" type="operatorEnum"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>

        <xs:attributeGroup ref="hasId"/>
        <xs:attributeGroup ref="requiresDatasource"/>

        <xs:attributeGroup ref="hasStyle"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="margin" type="xs:string"/>

        <xs:attribute name="applyTo" type="xs:string"/>
        <xs:attribute name="useMaxResults" type="xs:boolean"/>
        <xs:attribute name="manualApplyRequired" type="xs:boolean"/>
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="editable" type="xs:boolean"/>
        <xs:attribute name="folderActionsEnabled" type="xs:boolean"/>
    </xs:complexType>

    <!-- FieldGroup.FieldConfig -->
    <xs:complexType name="fieldGroupField">
        <xs:sequence>
            <xs:element name="formatter" minOccurs="0" maxOccurs="1" type="formatterType"/>
            <xs:element name="validator" minOccurs="0" maxOccurs="1" type="validatorType"/>
        </xs:sequence>

        <xs:attributeGroup ref="requiresId"/>

        <xs:attributeGroup ref="hasCaption"/>
        <xs:attributeGroup ref="hasEditState"/>
        <xs:attributeGroup ref="hasWidthProp"/>
        <xs:attributeGroup ref="hasVisibility"/>

        <xs:attribute name="requiredMessage" type="xs:string"/>
        <xs:attribute name="custom" type="xs:boolean"/>

        <xs:attribute name="datasource" type="xs:string"/>

        <xs:attribute name="resolution" type="dateFieldResolution"/>
        <xs:attribute name="dateFormat" type="xs:string"/>
        <xs:attribute name="maxLength" type="xs:int"/>

        <xs:attribute name="cols" type="xs:int"/>
        <xs:attribute name="rows" type="xs:int"/>

        <xs:attribute name="optionsDatasource" type="xs:string"/>
        <xs:attribute name="captionProperty" type="xs:string"/>
        <xs:attribute name="descriptionProperty" type="xs:string"/>
        <xs:attribute name="field" type="xs:string"/>
        <xs:attribute name="showSeconds" type="xs:string"/>
        <xs:attribute name="required" type="xs:boolean"/>
        <xs:attribute name="mask" type="xs:string"/>
        <xs:attribute name="valueMode" type="maskedFieldValueMode"/>
{'fraction_non_alphanumeric': 0.16160767521274866, 'fraction_numerical': 0.002981191392487398, 'mean_word_length': 2.712869792714832, 'pattern_counts': {'":': 0, '<': 1619, '<?xml version=': 2, '>': 1619, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3100240', 'n_tokens_mistral': 21466, 'n_tokens_neox': 20606, 'n_words': 3335}