ilscipio/scipio-erp

View on GitHub
framework/widget/dtd/widget-form.xsd

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xs:annotation>
        <xs:documentation><![CDATA[
            Form Widget Definitions
        
            SCIPIO: In Scipio, the form widget language is modified from stock Ofbiz with new elements and
            modifications to existing elements. The renderer is modified accordingly, and it may have yet
            additional changes not visible through the language elements alone (may be noted here).
            Changes are prefixed with the string "SCIPIO:" in annotations and comments.
            
            NOTE: Despite some fixes and enhancements to form widgets, in Scipio it is recommended to 
                write new forms using the Scipio Templating Toolkit API in Freemarker language, 
                in particular the @field, @fields and @fieldset macro directives from standard/htmlForm.ftl
                (component://common/webcommon/includes/scipio/lib/standard/htmlForm.ftl).
            
            Features and Modifications (including but not limited to):
            * In modified renderer implementation, field positions are treated as a true grid of
              configurable units. "position-span" attribute allows to control the span of an element (with 0=auto available),
              with default-position-span available for the whole forms. 
              Number of grid units are usually inferred, but may be explicitly specified per-form.
              (position, positions, position-span, default-position-span)
            * Our renderer implementation allows hiding table headers and entire forms when lists are empty
              and substituting with text. (hide-header-when, hide-table-when, use-alternate-text-when)
            * Some elements support a generic "attribs" attribute which contains a JSON-like map
              of extra attributes to be passed to the underlying macro implementation.
              This allows customization without renderer modification. (attribs)
              
            To use this and other widget XML schema definition files (*.xsd) in your development environment for autocompletion and validation,
            import the file named ".xmlcatalog.xml" from the Scipio project root as XML Catalog file/project type using import dialog.
            Note this also includes the definition files for all other Scipio/ofbiz XML resources such as entity models, service defs, etc.
        ]]></xs:documentation>
    </xs:annotation>
    <!--
        DEV NOTE: TODO: REVIEW: The following include has been expanded below.
        Changes made here may need to be duplicated there (but not necessarily).
        This allows for more reliable IDE integration, simplified XML parsing for libraries, and support for per-file modifications.
    -->
    <!--<xs:include schemaLocation="http://ofbiz.apache.org/dtds/widget-common.xsd" />-->
    <!-- ================== widget-common.xsd ==================== -->
    <xs:annotation>
        <xs:documentation><![CDATA[
            Common Widget Definitions

            SCIPIO: In Scipio, the common widget language is modified from stock Ofbiz with new elements and
            modifications to existing elements. The renderer is modified accordingly, and it may have yet
            additional changes not visible through the language elements alone (may be noted here).
            Changes are prefixed with the string "SCIPIO:" in annotations and comments.

            Features and Modifications (including but not limited to):
            * link element boolean attributes full-path/secure/encode no longer hardcode defaults (instead centralized in java),
              and the meaning, behavior and default behavior of those parameters is ratified for safer and more intuitive use.
              Reflects @ofbizUrl changes in Freemarker templates and java RequestHandler.makeLink changes.
              (see @ofbizUrl entry in utilities.ftl - component://common/webcommon/includes/scipio/lib/utilities.ftl;
              see makeLink and makeLinkAuto methods in RequestHandler.java - org.ofbiz.webapp.control.RequestHandler)
            * script element is enhanced for full inline script body support (based on simple-methods-v2)
            * New dedicated actions include directives - include-xxx-actions - notably include-screen-actions,
              which is shorter and more appropriate way to include actions defined in separate screens.
            * New master "if" actions directive available (based on simple-methods-v2), which is
              easier and more appropriate for actions-only conditions than the section conditions element
            * if-true/if-false conditional shorthand for booleans and string repr. of booleans
            * if-widget conditional for testing presence of widget definitions

            To use this and other widget XML schema definition files (*.xsd) in your development environment for autocompletion and validation,
            import the file named ".xmlcatalog.xml" from the Scipio project root as XML Catalog file/project type using import dialog.
            Note this also includes the definition files for all other Scipio/ofbiz XML resources such as entity models, service defs, etc.
        ]]></xs:documentation>
    </xs:annotation>
    <xs:complexType name="ConditionRootType">
        <xs:choice>
            <xs:element ref="and" />
            <xs:element ref="or" />
            <xs:element ref="xor" />
            <xs:element ref="not" />
            <xs:element ref="if-service-permission" />
            <xs:element ref="if-has-permission" />
            <xs:element ref="if-entity-permission" />
            <xs:element ref="if-validate-method" />
            <xs:element ref="if-compare" />
            <xs:element ref="if-compare-field" />
            <xs:element ref="if-regexp" />
            <xs:element ref="if-empty" />
            <xs:element ref="if-true" /><!-- SCIPIO: 2016-11-09: new -->
            <xs:element ref="if-false" /><!-- SCIPIO: 2016-11-09: new -->
            <xs:element ref="if-widget" /><!-- SCIPIO: 2016-11-11: new -->
            <xs:element ref="if-component" /><!-- SCIPIO: 2018-12-11: new -->
            <xs:element ref="if-entity" /><!-- SCIPIO: 2018-12-11: new -->
            <xs:element ref="if-service" /><!-- SCIPIO: 2018-12-11: new -->
        </xs:choice>
    </xs:complexType>
    <xs:element name="AllConditionals" abstract="true" />
    <xs:element name="and" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="AllConditionals" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="xor" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="AllConditionals" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="or" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" ref="AllConditionals" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="not" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="AllConditionals" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="if-service-permission" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute type="xs:string" name="service-name" use="required" />
            <xs:attribute type="xs:string" name="resource-description" use="optional" />
            <xs:attribute type="xs:string" name="context-map" use="optional" />
            <xs:attribute name="main-action" use="optional">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="ADMIN"/><!-- SCIPIO: 2018-05-24: allow direct test for ADMIN -->
                        <xs:enumeration value="CREATE" />
                        <xs:enumeration value="UPDATE" />
                        <xs:enumeration value="DELETE" />
                        <xs:enumeration value="VIEW" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="if-has-permission" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute type="xs:string" name="permission" use="required" />
            <xs:attribute type="xs:string" name="action" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-entity-permission" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:choice minOccurs="0">
                <xs:element minOccurs="0" maxOccurs="1" ref="permission-condition-getter" />
                <xs:element minOccurs="0" maxOccurs="1" ref="related-role-getter" />
                <xs:element minOccurs="0" maxOccurs="1" ref="auxiliary-value-getter" />
            </xs:choice>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
            <xs:attribute type="xs:string" name="entity-id" use="required">
                <xs:annotation>
                    <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="target-operation" use="required">
                <xs:annotation>
                    <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="display-fail-cond" type="xs:boolean"
                          default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="permission-condition-getter">
        <xs:complexType>
            <xs:attribute type="xs:string" name="entity-name" />
            <xs:attribute type="xs:string" name="operation-field-name" />
            <xs:attribute type="xs:string" name="role-field-name" />
            <xs:attribute type="xs:string" name="auxiliary-field-name" />
            <xs:attribute type="xs:string" name="status-field-name" />
            <xs:attribute type="xs:string" name="privilege-field-name" />
        </xs:complexType>
    </xs:element>
    <xs:element name="related-role-getter">
        <xs:complexType>
            <xs:attribute type="xs:string" name="entity-name" />
            <xs:attribute type="xs:string" name="role-entity-name" />
            <xs:attribute type="xs:string" name="role-type-field-name" />
            <xs:attribute type="xs:string" name="party-field-name" />
            <xs:attribute type="xs:string" name="owner-entity-field-name" />
            <xs:attribute type="xs:string" name="entity-id-name" />
        </xs:complexType>
    </xs:element>
    <xs:element name="auxiliary-value-getter">
        <xs:complexType>
            <xs:attribute type="xs:string" name="entity-name" />
            <xs:attribute type="xs:string" name="auxiliary-field-name" />
            <xs:attribute type="xs:string" name="entity-id-name" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-validate-method" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>Calls a static Java method that takes a
                String and returns a boolean.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
            <xs:attribute type="xs:string" name="method" use="required" />
            <xs:attribute type="xs:string" name="class" default="org.ofbiz.base.util.UtilValidate" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-compare" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute name="field" type="xs:string" use="required" />
            <xs:attribute name="operator" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="less" />
                        <xs:enumeration value="greater" />
                        <xs:enumeration value="less-equals" />
                        <xs:enumeration value="greater-equals" />
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="not-equals" />
                        <xs:enumeration value="contains" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="value" type="xs:string" use="required" />
            <xs:attribute name="type" default="String">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="PlainString" />
                        <xs:enumeration value="String" />
                        <xs:enumeration value="BigDecimal" />
                        <xs:enumeration value="Double" />
                        <xs:enumeration value="Float" />
                        <xs:enumeration value="Long" />
                        <xs:enumeration value="Integer" />
                        <xs:enumeration value="Date" />
                        <xs:enumeration value="Time" />
                        <xs:enumeration value="Timestamp" />
                        <xs:enumeration value="Boolean" />
                        <xs:enumeration value="Object" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="format" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-compare-field" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute name="field" type="xs:string" use="required" />
            <xs:attribute name="operator" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="less" />
                        <xs:enumeration value="greater" />
                        <xs:enumeration value="less-equals" />
                        <xs:enumeration value="greater-equals" />
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="not-equals" />
                        <xs:enumeration value="contains" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="to-field" type="xs:string" />
            <xs:attribute name="type" default="String">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="PlainString" />
                        <xs:enumeration value="String" />
                        <xs:enumeration value="BigDecimal" />
                        <xs:enumeration value="Double" />
                        <xs:enumeration value="Float" />
                        <xs:enumeration value="Long" />
                        <xs:enumeration value="Integer" />
                        <xs:enumeration value="Date" />
                        <xs:enumeration value="Time" />
                        <xs:enumeration value="Timestamp" />
                        <xs:enumeration value="Boolean" />
                        <xs:enumeration value="Object" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="format" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-regexp" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
            <xs:attribute type="xs:string" name="expr" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-empty" substitutionGroup="AllConditionals">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-true" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Evaluates to true if and only if the field is Boolean true
                OR the string value "true" (case-sensitive).
                Either field or value must be provided.
                2016-11-09: New element, added for 1.14.3.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute name="verify" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If true, and the test does not pass, the check will additionally
                        verify the failing expression to make sure it is a valid negative response and
                        print a log error upon failure.
                        Default: true</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="allow-empty" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If true, the field type verification check will accept empty or null as valid.
                        Default: true
                        NOTE: This only affects logging/exception handling. It does not affect whether
                        this condition returns true or false.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="if-false" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Evaluates to true if and only if the field is Boolean false
                OR the string value "false" (case-sensitive).
                2016-11-09: New element, added for 1.14.3.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute name="verify" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If true, and the test does not pass, the check will additionally
                        verify the failing expression to make sure it is a valid negative response and
                        print a log error upon failure.
                        Default: true</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="allow-empty" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If true, the field type verification check will accept empty or null as valid.
                        Default: true
                        NOTE: This only affects logging/exception handling. It does not affect whether
                        this condition returns true or false.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="if-widget" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Verifies a screen/form/menu widget.
                For example, "defined" operation checks if exists at the given location.
                Name/location support flexible expressions.
                2016-11-11: New element, added for 1.14.3.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" use="required"/>
            <xs:attribute name="type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="screen" />
                        <xs:enumeration value="form" />
                        <xs:enumeration value="menu" />
                        <xs:enumeration value="tree" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="operator" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="defined" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="if-component" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Returns true if the given component exists and is enabled.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="component-name" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-entity" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Returns true if the given entity exists.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if-service" substitutionGroup="AllConditionals">
        <xs:annotation>
            <xs:documentation>SCIPIO: Returns true if the given service exists.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="service-name" use="required" />
        </xs:complexType>
    </xs:element>

    <xs:element name="AllActions" abstract="true" />
    <xs:element name="set" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
            <xs:attribute type="xs:string" name="from-field" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="global" type="xs:boolean" default="false"/>
            <xs:attribute name="type">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="PlainString" />
                        <xs:enumeration value="String" />
                        <xs:enumeration value="BigDecimal" />
                        <xs:enumeration value="Double" />
                        <xs:enumeration value="Float" />
                        <xs:enumeration value="List" />
                        <xs:enumeration value="Long" />
                        <xs:enumeration value="Integer" />
                        <xs:enumeration value="Date" />
                        <xs:enumeration value="Time" />
                        <xs:enumeration value="Timestamp" />
                        <xs:enumeration value="Boolean" />
                        <xs:enumeration value="Object" />
                        <xs:enumeration value="NewList" />
                        <xs:enumeration value="NewMap" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="to-scope" default="screen">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="screen" />
                        <xs:enumeration value="user" />
                        <xs:enumeration value="application" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="from-scope" default="screen">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="screen" />
                        <xs:enumeration value="user" />
                        <xs:enumeration value="application" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="set-if-empty" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Controls if the target field can be set to an empty value. The meaning of "empty" depends on the Java data type.
                        Defaults to "true".
                        Optional.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="set-if-null" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Controls if the target field can be set to null when the from attribute evaluates to null.
                        Defaults to "true".
                        Optional.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="clear-field" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>
                SCIPIO: Sets the specified field to null.
                This is the same as the simple-methods*.xsd language clear-field.
                Added 2019-02-04.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="property-map" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:attribute type="xs:string" name="resource" use="required" />
            <xs:attribute type="xs:string" name="map-name" use="required" />
            <xs:attribute name="global" type="xs:boolean" default="false"/>
            <xs:attribute name="optional" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>
                        SCIPIO: If set to true, missing property-map will not generate an error.
                        NOTE: You may need to restart the system or clear various caches to see the effect of changing this flag.
                        Added 2018-11-29.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="property-to-field" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:attribute type="xs:string" name="resource" use="required" />
            <xs:attribute type="xs:string" name="property" use="required" />
            <xs:attribute type="xs:string" name="field" use="required" />
            <xs:attribute type="xs:string" name="default" />
            <xs:attribute name="no-locale" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="arg-list-name" />
        </xs:complexType>
    </xs:element>
    <xs:element name="script" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>Runs an external script and/or a short inline script (scriptlet). The scriptlet can be
                included in the script attribute or in the element body.

                SCIPIO: This element's functionality has been extended using the simple-methods-v2 minilang implementation of
                the element of the same name, to provide inline script functionality, as either child CDATA text or via "script" attribute.
                For inline scripts, a script language (groovy, etc.) must be specified, either using the explicit lang attribute (new in Scipio)
                or by prefixing to the script body followed by colon (no leading spaces; stock ofbiz syntax).

                PARSING BEHAVIOR: The child CDATA text of this element is NOT parsed for special operators,
                UNLIKE the simple-methods-v2 version and unlike the further "script" attribute described below.
                The intent of this difference is to avoid adulterating larger scripts in any way whatsoever.
                The simple-methods-v2 version of this element pre-parses the child text of its script element and
                this prevents inline scripts from perfectly emulating separate files.

                2016-11-11: Enhanced for 1.14.3.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attribute name="lang">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Script language, explicit.
                        Optional for scripts specified by location (extension is used instead; NOTE: 2016-11-11: lang attribute may be ignored for location).
                        Required for scripts inlined as child CDATA text script body or script attribute
                        IF the language name is not otherwise prefixed to the script body followed by colon (with no leading space, e.g. "groovy:...").
                        Unless succinctness has priority, it is preferable to specify this attribute rather than prefix
                        as it is less error-prone (prefix is space-sensitive) and supports xml editor completion.
                        Default: (none)
                        RECOMMENDED: groovy</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="groovy" />
                        <xs:enumeration value="simple-method" />
                        <xs:enumeration value="simple-map-processor" />
                        <!-- SCIPIO: 2018-09-19: Since this attribute was added for Scipio, likely nobody used this, so can let xml parser report as error
                        <xs:enumeration value="bsh">
                            <xs:annotation>
                                <xs:documentation>
                                    SCIPIO: 2018-09-19: DEPRECATED: Please change your code to groovy instead.
                                    Beanshell is no longer supported and this directive now runs Groovy in a compatibility mode.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>-->
                        <!-- SCIPIO: 2018-09-19: This was never used, and it's certain it cannot work
                            anymore; unclear if it ever had a chance of working or could in future
                        <xs:enumeration value="java" />-->
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="location"><!-- SCIPIO: no longer strictly required: use="required" -->
                <xs:annotation>
                    <xs:documentation>The script location. The location attribute accepts the component:// file location
                        protocol. Script functions/methods can be invoked by appending a hash (#) and the
                        function/method name.

                        Required if the script attribute and script element body (child CDATA text) are empty.

                        SCIPIO: This is a STOCK attribute, but it has been enhanced to support flexible expressions,
                        evaluated at runtime.
                        WARN: The screens that parametrize script locations and/or names are responsible for using
                        only safe variables (DO NOT use the parameters map).
                        Enhanced for 1.14.2.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="script">
                <xs:annotation>
                    <xs:documentation><![CDATA[
                        A short script (scriptlet). Can be used instead of a file.
                        The script must be prefixed with the script language followed by a colon (":"), with no leading spaces,
                        OR (new in Scipio) the language may be specified in the explicit lang attribute.

                        Required if the location attribute is empty and there is no script body as child CDATA text. Attribute type: script.

                        SCIPIO: This attribute and script inlining is borrowed from minilang simple-methods-v2 for use in screens directives.
                        In Scipio, the main draw is inlining script body as child CDATA text and this attribute is the alternative.
                        NOTE: This script attribute - but NOT the script body if specified as child CDATA text - is subject to
                            pre-parsing for special keyword operator substitutions (as done by simple-methods-v2 in stock ofbiz):
                              @and, @or, @lteq, @gteq, @lt, @gt
                            These are translated to, respectively:
                              &&, ||, <=, >=, <, >
                            See org.ofbiz.base.util.StringUtil.convertOperatorSubstitutions for detailed behavior.
                        NOTE: The context preparation and behavior of this scriptlet behaves slightly differently than that of scripts
                            inlined into flexible expressions (FlexibleStringExpander) in other attributes.
                            This one behaves analogous to the dedicated script files when specified by location, unlike the inline
                            scripts in those flexible expressions (this is part reason for the enhancement of the script element in Scipio).
                        2016-11-11: Added for 1.14.3.
                    ]]></xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:boolean" name="trim-lines" default="true">
                <xs:annotation>
                    <xs:documentation>SCIPIO: If true, perform trim on every line of child CDATA text to remove excess whitespace from XML.
                        NOTE: This gets rid of indents, but flattens code.
                        NOTE: If set to false, may affect performance due to the script caching mechanism (keyed on script body).
                        Default: true (to optimize caching speed)</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="entity-one" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-map" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" />
            </xs:sequence>
            <xs:attribute name="entity-name" type="xs:string" use="required" />
            <xs:attribute name="value-field" type="xs:string"><!-- SCIPIO: 2018-04-14: was never required: use="required" -->
                <xs:annotation>
                    <xs:documentation>
                        Name of a context field to store the resulting entity value;
                        if omitted, the entity's fields are dumped into the current context.

                        SCIPIO: NOTE: This attribute was marked as required in stock ofbiz,
                        but it always worked fine without it and behaved as described here.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="use-cache" type="xs:boolean" default="false"/>
            <xs:attribute name="auto-field-map" type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="get-related-one" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:attribute name="value-field" type="xs:string" use="required" />
            <xs:attribute name="relation-name" type="xs:string" use="required" />
            <xs:attribute name="use-cache" type="xs:string" default="false" />
            <xs:attribute name="to-value-field" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="get-related" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:attribute type="xs:string" name="value-field" use="required" />
            <xs:attribute type="xs:string" name="relation-name" use="required" />
            <xs:attribute type="xs:string" name="map" />
            <xs:attribute type="xs:string" name="order-by-list" />
            <xs:attribute type="xs:string" name="use-cache" default="false" />
            <xs:attribute type="xs:string" name="list" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-screen-actions" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Includes a screen's top section actions in this widget's actions where the directive appears.
                Name and location support flexible expressions and are resolved at runtime.
                NOTE: This ignores and bypasses the named screen's condition element.
                NOTE: This directive includes the actions from the fully-built target widget model (rather than textually), with full recursion implied
                but ONLY with respect to other include-screen-actions directives;
                this will NOT include actions that would be run as a result of the widgets-element-based include-screen directive.
                In other words, the screens referenced with this directive should strive to use solely directives under the
                actions element, and even omit the other top directives entirely for clarity.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-form-actions" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Includes a form's top section actions in this widget's actions where the directive appears.
                NOTE: This directive includes the actions from the fully-built target widget model (not textually), with full recursion implied.
                name and location support flexible expressions and are resolved at runtime.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-form-row-actions" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Includes a form's top section row-actions in this widget's actions where the directive appears.
                NOTE: This directive includes the actions from the fully-built target widget model (not textually), with full recursion implied.
                name and location support flexible expressions and are resolved at runtime.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-menu-actions" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Includes a menu's top section actions in this widget's actions where the directive appears.
                NOTE: This directive includes the actions from the fully-built target widget model (not textually), with full recursion implied.
                name and location support flexible expressions and are resolved at runtime.
                NOTE: Not to be confused with the static/build-time include-actions directive available as child of menu/sub-menu elements from widget-menu.xsd.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-tree-actions" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Includes a tree's top section actions in this widget's actions where the directive appears.
                NOTE: This directive includes the actions from the fully-built target widget model (not textually), with full recursion implied.
                name and location support flexible expressions and are resolved at runtime.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required"/>
            <xs:attribute type="xs:string" name="location" />
        </xs:complexType>
    </xs:element>
    <xs:element name="condition-list">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element ref="condition-expr" />
                <xs:element ref="condition-list" />
                <xs:element ref="condition-object" />
            </xs:choice>
            <xs:attribute name="combine" default="and">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="and" />
                        <xs:enumeration value="or" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="having-condition-list">
        <xs:complexType>
            <xs:choice maxOccurs="unbounded">
                <xs:element ref="condition-expr" />
                <xs:element ref="condition-list" />
                <xs:element ref="condition-object" />
            </xs:choice>
            <xs:attribute name="combine" default="and">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="and" />
                        <xs:enumeration value="or" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="condition-expr">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field-name" use="required" />
            <xs:attribute name="operator" default="equals">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="less" />
                        <xs:enumeration value="greater" />
                        <xs:enumeration value="less-equals" />
                        <xs:enumeration value="greater-equals" />
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="not-equals" />
                        <xs:enumeration value="in" />
                        <xs:enumeration value="not-in" />
                        <xs:enumeration value="between" />
                        <xs:enumeration value="like" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="from-field" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute name="ignore-if-null" type="xs:boolean" default="false"/>
            <xs:attribute name="ignore-if-empty" type="xs:boolean" default="false"/>
            <xs:attribute name="ignore-case" type="xs:boolean" default="false"/>
            <xs:attribute name="ignore" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>
                        Ignore the condition if flag is true.
                        Defaults to false.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="condition-object">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="select-field">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field-name" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="order-by">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field-name" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="limit-range">
        <xs:complexType>
            <xs:attribute name="start" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>Should resolve into a non-negative integer.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="size" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>Should resolve into a non-negative integer.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="limit-view">
        <xs:complexType>
            <xs:attribute name="view-index" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>Should resolve into a non-negative integer.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="view-size" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>Should resolve into a positive integer.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="use-iterator" />
    <xs:element name="field-map">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field-name" use="required" />
            <xs:attribute type="xs:string" name="from-field" />
            <xs:attribute type="xs:string" name="value" />
        </xs:complexType>
    </xs:element>
    <xs:element name="parameter">
        <xs:complexType>
            <xs:attribute type="xs:string" name="param-name" use="required" />
            <xs:attribute type="xs:string" name="from-field" />
            <xs:attribute type="xs:string" name="value" />
        </xs:complexType>
    </xs:element>
    <xs:element name="auto-parameters-service">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
            </xs:sequence>
            <xs:attribute name="service-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="send-if-empty" type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="auto-parameters-entity">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" />
            </xs:sequence>
            <xs:attribute name="entity-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="include" default="pk">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="pk" />
                        <xs:enumeration value="nonpk" />
                        <xs:enumeration value="all" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="send-if-empty" type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="parameter-map">
        <xs:annotation>
            <xs:documentation>SCIPIO: Designates a field containing a map whose entries to use as parameters.
                2017-09-21: New in Scipio; added for 1.14.4.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="from-field" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Name of field which should contain a map whose entries will be used as parameters.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="exclude">
        <xs:complexType>
            <xs:attribute name="field-name" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:complexType name="link">
        <xs:sequence>
            <xs:element minOccurs="0" ref="auto-parameters-service"/>
            <xs:element minOccurs="0" ref="auto-parameters-entity"/>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter-map" /><!-- SCIPIO: added 2017-09-21 -->
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
            <xs:element minOccurs="0" name="image" type="image" />
        </xs:sequence>
        <xs:attribute type="xs:string" name="text" />
        <xs:attribute type="xs:string" name="id">
            <xs:annotation>
                <xs:documentation>
                    If you use id for link present in list form or multi form, you can use ${itemIndex} to generate an unique id by line.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute type="xs:string" name="style" />
        <xs:attribute type="xs:string" name="name" />
        <xs:attribute type="xs:string" name="title" />
        <xs:attribute type="xs:nonNegativeInteger" name="size" /><!-- Text size limit -->
        <xs:attribute type="xs:string" name="target">
            <xs:annotation>
                <xs:documentation>
                    Link target (href).
                    SCIPIO: 2016-10-21: enhanced: if url-mode is "inter-app" and target ends with exactly the string
                    "#extLoginKey=OFF", then no external login key is added, and the
                    "#extLoginKey=OFF" string is stripped. It must be the last part of the string to work (ends with).
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute type="xs:string" name="target-window" />
        <xs:attribute type="xs:string" name="prefix" />
        <xs:attribute type="xs:string" name="width" />
        <xs:attribute type="xs:string" name="height" />
        <xs:attribute name="link-type" default="auto">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="auto">
                        <xs:annotation>
                            <xs:documentation>
                                If selected the hidden-form type will be used if the url-mode is intra-app
                                and the request specified has an event, otherwise the anchor type will be used,
                                except if the ajax-window or layered-modal mode is specified.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="anchor" />
                    <xs:enumeration value="hidden-form" />
                    <!-- FIXME: This is not a link type. It indicates the target window should be a popup dialog. -->
                    <xs:enumeration value="ajax-window" />
                    <xs:enumeration value="layered-modal">
                        <xs:annotation>
                            <xs:documentation>
                                SCIPIO: WARN: 2018-09-04: This link type is
                                not fully supported at this time. Merged 2018-09-04.
                            </xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="url-mode" default="intra-app">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="intra-app" />
                    <xs:enumeration value="inter-app" />
                    <xs:enumeration value="content" />
                    <xs:enumeration value="plain" />
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="full-path" type="xs:boolean"/><!-- SCIPIO: default removed - default is null: default="false" -->
        <xs:attribute name="secure" type="xs:boolean"/><!-- SCIPIO: default removed - default is null: default="false" -->
        <xs:attribute name="encode" type="xs:boolean"/><!-- SCIPIO: default removed - default is null (should be true, not false!): default="false" -->
        <xs:attribute name="request-confirmation" type="xs:boolean"
                      default="false">
            <xs:annotation>
                <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default
                    SCIPIO: TODO: Currently only implemented for certain types of links (hyperlink)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute type="xs:string" name="confirmation-message">
            <xs:annotation>
                <xs:documentation>The message displayed in confirmation box
                    SCIPIO: TODO: Currently only implemented for certain types of links (hyperlink)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute type="xs:string" name="use-when">
            <xs:annotation>
                <xs:documentation>SCIPIO: A condition whose result should evaluate to true/false to determine
                    when the link should be applied to the text. In gneeral, expressions should be specified using
                    flexible expressions syntax: ${...}, ${groovy:...}, etc.
                    NOTE: Some specific link sub-types may also fallback to plain Groovy expressions (without ${...} written),
                    but this is currently inconsistent (e.g. form widget sub-hyperlink has it).
                    NOTE: Currently (2016-09-12), this is only used directly by menu widgets.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="image" mixed="true">
        <xs:attribute type="xs:string" name="src" />
        <xs:attribute type="xs:string" name="id" />
        <xs:attribute type="xs:string" name="style" />
        <xs:attribute type="xs:string" name="width" />
        <xs:attribute type="xs:string" name="height" />
        <xs:attribute type="xs:string" name="border" />
        <xs:attribute type="xs:string" name="alt" />
        <xs:attribute type="xs:string" name="title" />
        <xs:attribute name="url-mode" default="content">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="ofbiz" />
                    <xs:enumeration value="content" />
                    <xs:enumeration value="raw" />
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
    <xs:element name="condition-to-field" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Evaluates children condition elements and sets a field based on the boolean result.
                By default, and for String/PlainString types, this returns a string having the value "true"/"false" (String type is for consistency with set operation);
                if Boolean type explicitly specified, returns proper Boolean true/false;
                special "Indicator" type returns "Y"/"N" as string;
                all others return null by default and values can be specified through pass-value/fail-value attributes.
                2016-11-09: New in Scipio; added for 1.14.3.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="1" maxOccurs="unbounded" ref="AllConditionals" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="field" use="required" />
            <xs:attribute name="type" default="String">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="PlainString" />
                        <xs:enumeration value="String" />
                        <xs:enumeration value="BigDecimal" />
                        <xs:enumeration value="Double" />
                        <xs:enumeration value="Float" />
                        <xs:enumeration value="List" />
                        <xs:enumeration value="Long" />
                        <xs:enumeration value="Integer" />
                        <xs:enumeration value="Date" />
                        <xs:enumeration value="Time" />
                        <xs:enumeration value="Timestamp" />
                        <xs:enumeration value="Boolean" />
                        <xs:enumeration value="Object" />
                        <xs:enumeration value="Map" />
                        <xs:enumeration value="Indicator" /><!-- SCIPIO: special type; returns "Y" or "N" string instead of true/false -->
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="global" type="xs:boolean" default="false"/>
            <xs:attribute name="to-scope" default="screen">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="screen" />
                        <xs:enumeration value="user" />
                        <xs:enumeration value="application" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="pass-value">
                <xs:annotation>
                    <xs:documentation>Value when condition evaluates to true.
                        Default: true for Boolean, "true" for String/PlainString, "Y" for Indicator, null for others</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="fail-value">
                <xs:annotation>
                    <xs:documentation>Value when condition evaluates to true.
                        Default: false for Boolean, "false" for String/PlainString, "N" for Indicator, null for others</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="use-when">
                <xs:annotation>
                    <xs:documentation>A boolean expression which controls whether the command actually takes place.
                        Supports flexible expressions (EL, groovy:), only.
                        Must resolve to either "true" or "false", as string representation of boolean.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="only-if-field">
                <xs:annotation>
                    <xs:documentation>Sets only if the target field is empty or null (empty includes null).
                        NOTE: 2016-11-09: this respects the global flag if globalContext is present,
                        but currently does not respect the to-scope (FIXME?).</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="null" />
                        <xs:enumeration value="empty" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="close-object" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Closes a Closeable, AutoCloseable or EntityListIterator object if not null.
                Unknown types will register an error.
                Added 2019-05-17 for 2.1.0.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="throw-exception" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>SCIPIO: Throws an exception, which if not a runtime exception may be wrapped in one.
                Warning: This was first written for use with catch-actions from widget-screen.xsd, and untested elsewhere.
                Added 2019-05-17 for 2.1.0.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="field" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="if" substitutionGroup="AllActions">
        <xs:annotation>
            <xs:documentation>
                Performs conditional processing on blocks of code.
                This operation specifies combinations of conditions, alternate conditions,
                and operations to run based on the evaluation of condition expressions.

                SCIPIO: Adapted from simple-methods-v2 to provide basic way to conditionals
                without the heavy widget elements.
                2016-11-11: Added for 1.14.3.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="condition" type="IfCond-Condition" minOccurs="0" maxOccurs="1" />
                <xs:element name="then" type="IfCond-Then"/>
                <xs:element minOccurs="0" maxOccurs="unbounded" name="else-if" type="IfCond-ElseIf"/>
                <xs:element minOccurs="0" name="else" type="IfCond-Else"/>
            </xs:sequence>
            <xs:attribute name="condition">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Condition boolean expression (supporting flexible expressions), alternative to
                        condition element. Must evaluate strictly to the value "true" or "false".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="IfCond-Condition">
        <xs:annotation>
            <xs:documentation>
                Combines a group of conditional elements into a single logical (true/false) expression.

                SCIPIO: Adapted from simple-methods-v2 to provide basic way to conditionals
                without the heavy widget elements.
                In addition, now supports an inline quick condition expression attribute as alternative to the condition element.
                2016-11-15: Added for 1.14.3.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element ref="AllConditionals"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="IfCond-Then">
        <xs:annotation>
            <xs:documentation>
                Contains a block of code to be executed when a condition element evaluates to true.

                SCIPIO: Adapted from simple-methods-v2 to provide basic way to conditionals
                without the heavy widget elements.
                2016-11-11: Added for 1.14.3.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="AllActions"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="IfCond-ElseIf">
        <xs:annotation>
            <xs:documentation>
                Contains a condition and a block of code to be evaluated/executed when a parent condition evaluates to false.
                This element must contain two sub-elements: condition and then.
                If the condition of the parent element evaluates to false, then this element's condition will be evaluated,
                and if that condition evaluates to true, then the operations under the then element will be run.

                SCIPIO: Adapted from simple-methods-v2 to provide basic way to conditionals
                without the heavy widget elements.
                In addition, now supports an inline quick condition expression attribute as alternative to the condition element.
                2016-11-15: Added for 1.14.3.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="condition" type="IfCond-Condition" minOccurs="0" maxOccurs="1" />
            <xs:element name="then" type="IfCond-Then"/>
        </xs:sequence>
        <xs:attribute name="condition">
            <xs:annotation>
                <xs:documentation>SCIPIO: Condition boolean expression (supporting flexible expressions), alternative to
                    condition element. Must evaluate strictly to the value "true" or "false".</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="IfCond-Else">
        <xs:annotation>
            <xs:documentation>
                Contains a block of code to be executed when a condition evaluates to false.

                SCIPIO: Adapted from simple-methods-v2 to provide basic way to conditionals
                without the heavy widget elements.
                2016-11-11: Added for 1.14.3.
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="AllActions"/>
        </xs:sequence>
    </xs:complexType>
    <!-- ================== END widget-common.xsd ==================== -->
    <!-- ================== FORMS ==================== -->
    <xs:element name="forms">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded"><!-- SCIPIO: Allow none (minOccurs="0") -->
                <xs:element ref="form"/>
                <xs:element ref="grid"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="form">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="actions" />
                <xs:element minOccurs="0" ref="row-actions" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="alt-row-style" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="alt-target" />
                <!-- SCIPIO: 2017-04-21: new: extra spot to insert javascript -->
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="page-script" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="auto-fields-service" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="auto-fields-entity" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="field" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="on-event-update-area" />
                <xs:element minOccurs="0" ref="sort-order" />
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="type">
                <xs:annotation>
                    <xs:documentation>The form type is always required unless you are extending another form.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="single">
                            <xs:annotation>
                                <xs:documentation>a single form is a simple single form with values from a single set of values</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="list">
                            <xs:annotation>
                                <xs:documentation>a list form is a list of individual forms in a table (could be called a tabular form), it has a list of sets of values and creates one form for each list element</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="multi">
                            <xs:annotation>
                                <xs:documentation>a multi form is like a list/tabular form, but it creates a single form to submit all list item forms at once; the field names in the resulting form have an appendage attached to make them unique according to the pattern used for the multi-service
                                    event handler that will call one service for each list element</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="upload">
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="target" type="xs:string" />
            <xs:attribute name="target-window" type="xs:string" />
            <xs:attribute name="target-type" default="intra-app">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="intra-app" />
                        <xs:enumeration value="inter-app" />
                        <xs:enumeration value="content" />
                        <xs:enumeration value="plain" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="id" type="xs:string" />
            <xs:attribute name="style" type="xs:string" />
            <xs:attribute name="focus-field-name" type="xs:string" />
            <xs:attribute name="title" type="xs:string" />
            <xs:attribute name="empty-form-data-message" type="xs:string" default="${uiLabelMap.CommonNoRecordFound}">
                <xs:annotation>
                    <xs:documentation>SCIPIO: NOTE: 2018-09-04: Not currently supported in Scipio and may not work properly;
                        please use the "use-alternate-text-when" attribute and/or the "useAlternateTextWhen"
                        expressions in widget.properties instead, which are more versatile. 
                        This attribute is present for forward-compatibility only. Merged 2018-09-04.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="tooltip" type="xs:string" />
            <xs:attribute name="list-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>for list type and other multiple data/form types this is the name of the list in the context to iterate over</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="list-entry-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>if specified each list entry will be put in the context with this name; otherwise the list entry must be a Map and the entries in the Map will be put into the context by name</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <!-- this is now deprecated, never made sense to separate anyway; use list-name instead <xs:attribute type="xs:string" name="list-iterator-name"/> -->
            <xs:attribute type="xs:string" name="default-map-name" />
            <xs:attribute type="xs:string" name="default-entity-name" />
            <xs:attribute type="xs:string" name="default-service-name" />
            <xs:attribute type="xs:string" name="form-title-area-style">
                <xs:annotation>
                    <xs:documentation>The form-title-area-style specifies the style to use in the header or title area for the form in a multi-form widget with all form fields rendered in one area.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="form-widget-area-style">
                <xs:annotation>
                    <xs:documentation>The form-widget-area-style specifies the style to use in the main or widget area for the form in a multi-form widget with all form fields rendered in one area.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-title-area-style" />
            <xs:attribute type="xs:string" name="default-widget-area-style" />
            <xs:attribute type="xs:string" name="default-title-style" />
            <xs:attribute type="xs:string" name="default-widget-style" />
            <xs:attribute type="xs:string" name="default-tooltip-style" />
            <xs:attribute type="xs:string" name="default-required-field-style" />
            <xs:attribute type="xs:string" name="sort-field-parameter-name">
                <xs:annotation>
                    <xs:documentation>
                        The name of the request parameter that is used for specifying the sorted column. This is required when you
                        have more than one list on a screen - each list must use its own sort field parameter. Defaults to "sortField".
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-asc-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order-asc".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-desc-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order-desc".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate" default="${paginate}">
                <xs:annotation>
                    <xs:documentation>Indicate if this form is paginated or not, true by default.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-target">
                <xs:annotation>
                    <xs:documentation>Target location for the [Previous] and [Next] buttons in a form with pagination. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-target-anchor">
                <xs:annotation>
                    <xs:documentation>Target anchor for the [Previous] and [Next] buttons in a form with pagination.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-size-field">
                <xs:annotation>
                    <xs:documentation>The name of the parameter that specifies the number of rows to display for each page in a list form with multiple pages. The default is VIEW_SIZE. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-index-field">
                <xs:annotation>
                    <xs:documentation>The name of the parameter that specifies what the current page is in a list form with multiple pages. The default is VIEW_INDEX Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="override-list-size">
                <xs:annotation>
                    <xs:documentation>The total number of rows in the original list (used for pagination). 
                                      If not specified, the size of the list will be used. Accepts ${} notation.
                                      You may use any value, true makes sense, when using performFindList, but one value must be passed. 
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-first-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [First] button in a form with pagination. Defaults to the CommonFirst label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-previous-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Previous] button in a form with pagination. Defaults to the CommonPrevious label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-next-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Next] button in a form with pagination. Defaults to the CommonNext label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-last-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Last] button in a form with pagination. Defaults to the CommonLast label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-style">
                <xs:annotation>
                    <xs:documentation>CSS style to use for the whole pager in a form with pagination. Defaults to "nav-pager".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="item-index-separator" default="_o_" />
            <xs:attribute type="xs:string" name="extends" />
            <xs:attribute type="xs:string" name="extends-resource" />
            <xs:attribute name="separate-columns" type="xs:boolean"><!-- default="true" ; old/stock default: default="false" -->
                <xs:annotation>
                    <xs:documentation>Determines if the editable fields of a list/multi form should group
                        together or now (false to group, true to keep separate).
                        SCIPIO: NOTE: This is a STOCK attribute, but its default has been changed from false to true.
                        It is usually only considered when group-columns is true. It is an "inner" switch
                        to enable/disable grouping within the form-building logic and is the one
                        most popularly used in most forms.
                        Default: true
                        NOTE: The default in Scipio is changed to true because Scipio's themes can
                            handle long menus better, and the separated fields are easier to read.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="group-columns" type="xs:boolean"><!-- default="true" -->
                <xs:annotation>
                    <xs:documentation>Determines if the form should support grouping fields.
                        SCIPIO: NOTE: This is a STOCK attribute. It is a top-level
                        "hard" switch to disable all column grouping-based code. If set to false,
                        it will logically imply separate-columns true but may additionally
                        prevent some other form behaviors.
                        Default: true
                        WARN: Nearly all stock and Scipio-modified forms are built and tested using true for this attribute.
                            It is safer to change the separate-columns attribute value instead.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:integer" name="view-size">
                <xs:annotation>
                    <xs:documentation>The number of items to display per page</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="row-count" />
            <xs:attribute name="use-row-submit" type="xs:boolean"/><!-- default="false" -->
            <xs:attribute name="skip-start" type="xs:boolean" default="false"/>
            <xs:attribute name="skip-end" type="xs:boolean" default="false"/>
            <xs:attribute name="hide-header" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="odd-row-style">
                <xs:annotation>
                    <xs:documentation>The odd-row-style specifies the style to use in the table content odd rows.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="even-row-style">
                <xs:annotation>
                    <xs:documentation>The even-row-style specifies the style to use in the table content even rows.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="header-row-style">
                <xs:annotation>
                    <xs:documentation>The header-row-style specifies the style to use in the header of table.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-table-style">
                <xs:annotation>
                    <xs:documentation>The default-table-style specifies the style to use in the table.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="client-autocomplete-fields"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <!--
                not sure this is such a good idea <xs:attribute type="xs:string" name="hidden-values-map-name"> <xs:annotation> <xs:documentation>A map that contains hidden field name/value pairs. The reason for this is to eliminate the need to code custom forms so that auxiliary, passthru data can
                be sent to the server. By doing it this way, more standard forms can be used. </xs:documentation> </xs:annotation> </xs:attribute>
            -->
            <xs:attribute type="xs:string" name="hide-header-when">
                <xs:annotation>
                    <xs:documentation>SCIPIO: For list forms, if this condition evaluates to true, do not print table header. This is a context-expanded EL expression (not groovy-only) that should evaluate to true or false. Implicit default is 'false', unless hide-header is true, but explicit 'false' overrides hide-header. See widget.properties for renderer-specific defaults.
                        The following context booleans are useful for this condition and always present: formHasList, formHasResult, formHasDisplayResult.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="hide-table-when">
                <xs:annotation>
                    <xs:documentation>SCIPIO: For list forms, if this condition evaluates to true, do not print table header. This is a context-expanded EL expression (not groovy-only) that should evaluate to true or false. Implied default is 'false'. See widget.properties for renderer-specific defaults.
                        The following context booleans are useful for this condition and always present: formHasList, formHasResult, formHasDisplayResult.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="use-alternate-text-when">
                <xs:annotation>
                    <xs:documentation>SCIPIO: For list forms, if this condition evaluates to true, show an alternate text. Mainly useful for setting a no-result-text message when form has no results. This is a context-expanded EL expression (not groovy-only) that should evaluate to true or false. Implied default is 'false'. See widget.properties for renderer-specific defaults.
                        The following context booleans are useful for this condition and always present: formHasList, formHasResult, formHasDisplayResult.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="alternate-text">
                <xs:annotation>
                    <xs:documentation>SCIPIO: For list forms, alternate text to show when use-alternate-text-when evaluates to true. Display markup is influenced by hide-header/table-* options. See widget.properties for renderer-specific defaults.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="alternate-text-style">
                <xs:annotation>
                    <xs:documentation>SCIPIO: For list forms, style of alternate text. See widget.properties for renderer-specific defaults.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="positions" type="xs:integer">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Explicit total grid positions to use for this form. Sometimes it's clearer to specify though may be omitted and it will be auto-calculated.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="default-position-span" type="xs:integer" default="1">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Default position span for field elements for this form. 0 means auto or occupy all available positions. 1 means occupy one position grid space.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="default-combine-action-fields" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>SCIPIO: If true, uses combine-previous on groups of adjacent action-button-like field (submit, reset, hyperlink with no title) so they render together</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="attribs">
                <xs:annotation>
                    <xs:documentation>SCIPIO: A json-/freemarker-like object (map) of per-form extra attributes passed to the underlying theme implementation (template macros).
                      Note that if a parent (extended) form already had extra attribs, only top-level attribs will be merged; sub-maps will replace those from parent (shallow merge).
                      
                      The default Scipio implementation currently recognizes (but is not limited to) these map entries:
                      {
                        'showProgress' : true/false,  // for upload forms only: boolean (or string repr of boolean, 'true/false') show upload progress dynamically. 
                                                      // With dynamic progress, a special action is usually needed upon success (see progress-success-action).
                        'progressOptions' : {},       // Upload forms only: a map (or empty string) of progress options, mainly element selectors and IDs (see ScipioUploadProgress js class). 
                                                      // e.g.: { 'errorResultContainerSel': '#main-alert', 'errorResultAddWrapper': false }
                        'progressSuccessAction' : ''  // Upload forms only: action to take when upload succeeds. Format and values are:
                                                      // 'none' - stay on current page (progress will indicate success)
                                                      // 'redirect;[options];[ofbizUrl]' - redirect to the specified controller request. e.g. "redirect;;myRequest?param1=value1&amp;amp;param2=${myMap.value2}"
                                                      //      options are: fullPath=[true|false],secure=[true|false],encode=[true|false]. 
                                                      //      e.g. 'redirect;secure=true,fullPath=true;main'
                                                      // 'reload' - reload current page (note: this should be avoided as in many cases the current implementation causes problems with Ofbiz navigation)
                      }
                      </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="method">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Essential setting to control whether form is a post or get action. 
                      Implied default is "post".
                      Only meaningful for widget form types with submit forms generated.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="post" />
                        <xs:enumeration value="get" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="grid">
        <xs:annotation>
            <xs:documentation>
                a list of individual forms in a table (could be called a tabular form), it has a list of sets of values and creates one form for each list element
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="actions" />
                <xs:element minOccurs="0" ref="row-actions" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="alt-row-style" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="alt-target" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="auto-fields-service" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="auto-fields-entity" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="field" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="on-event-update-area" />
                <xs:element minOccurs="0" ref="sort-order" />
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="target" type="xs:string" />
            <xs:attribute name="target-window" type="xs:string" />
            <xs:attribute name="target-type" default="intra-app">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="intra-app" />
                        <xs:enumeration value="inter-app" />
                        <xs:enumeration value="content" />
                        <xs:enumeration value="plain" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="id" type="xs:string" />
            <xs:attribute name="style" type="xs:string" />
            <xs:attribute name="focus-field-name" type="xs:string" />
            <xs:attribute name="title" type="xs:string" />
            <xs:attribute name="empty-form-data-message" type="xs:string" default="${uiLabelMap.CommonNoRecordFound}">
                <xs:annotation>
                    <xs:documentation>SCIPIO: NOTE: 2018-09-04: Not currently supported in Scipio and may not work properly;
                        please use the "use-alternate-text-when" attribute and/or the "useAlternateTextWhen"
                        expressions in widget.properties instead, which are more versatile. 
                        This attribute is present for forward-compatibility only. Merged 2018-09-04.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="tooltip" type="xs:string" />
            <xs:attribute name="list-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>for list type and other multiple data/form types this is the name of the list in the context to iterate over</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="list-entry-name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>if specified each list entry will be put in the context with this name; otherwise the list entry must be a Map and the entries in the Map will be put into the context by name</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <!-- this is now deprecated, never made sense to separate anyway; use list-name instead <xs:attribute type="xs:string" name="list-iterator-name"/> -->
            <xs:attribute type="xs:string" name="default-map-name" />
            <xs:attribute type="xs:string" name="default-entity-name" />
            <xs:attribute type="xs:string" name="default-service-name" />
            <xs:attribute type="xs:string" name="form-title-area-style">
                <xs:annotation>
                    <xs:documentation>The form-title-area-style specifies the style to use in the header or title area for the form in a multi-form widget with all form fields rendered in one area.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="form-widget-area-style">
                <xs:annotation>
                    <xs:documentation>The form-widget-area-style specifies the style to use in the main or widget area for the form in a multi-form widget with all form fields rendered in one area.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-title-area-style" />
            <xs:attribute type="xs:string" name="default-widget-area-style" />
            <xs:attribute type="xs:string" name="default-title-style" />
            <xs:attribute type="xs:string" name="default-widget-style" />
            <xs:attribute type="xs:string" name="default-tooltip-style" />
            <xs:attribute type="xs:string" name="default-required-field-style" />
            <xs:attribute type="xs:string" name="sort-field-parameter-name">
                <xs:annotation>
                    <xs:documentation>
                        The name of the request parameter that is used for specifying the sorted column. This is required when you
                        have more than one list on a screen - each list must use its own sort field parameter. Defaults to "sortField".
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-asc-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order-asc".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-sort-field-desc-style">
                <xs:annotation>
                    <xs:documentation>CSS style to used for form sort fields. Defaults to "sort-order-desc".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate" default="${paginate}">
                <xs:annotation>
                    <xs:documentation>Indicate if this form is paginated or not, true by default.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-target">
                <xs:annotation>
                    <xs:documentation>Target location for the [Previous] and [Next] buttons in a form with pagination. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-target-anchor">
                <xs:annotation>
                    <xs:documentation>Target anchor for the [Previous] and [Next] buttons in a form with pagination.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-size-field">
                <xs:annotation>
                    <xs:documentation>The name of the parameter that specifies the number of rows to display for each page in a list form with multiple pages. The default is VIEW_SIZE. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-index-field">
                <xs:annotation>
                    <xs:documentation>The name of the parameter that specifies what the current page is in a list form with multiple pages. The default is VIEW_INDEX Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="override-list-size">
                <xs:annotation>
                    <xs:documentation>The total number of rows in the original list (used for pagination). If not specified, the size of the list will be used. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-first-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [First] button in a form with pagination. Defaults to the CommonFirst label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-previous-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Previous] button in a form with pagination. Defaults to the CommonPrevious label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-next-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Next] button in a form with pagination. Defaults to the CommonNext label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-last-label">
                <xs:annotation>
                    <xs:documentation>Text to display for the [Last] button in a form with pagination. Defaults to the CommonLast label defined in CommonUiLabels.xml. Accepts ${} notation.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="paginate-style">
                <xs:annotation>
                    <xs:documentation>CSS style to use for the whole pager in a form with pagination. Defaults to "nav-pager".</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="item-index-separator" default="_o_" />
            <xs:attribute type="xs:string" name="extends" />
            <xs:attribute type="xs:string" name="extends-resource" />
            <xs:attribute name="separate-columns" type="xs:boolean"
                          default="false"/>
            <xs:attribute name="group-columns" type="xs:boolean" default="true"/>
            <xs:attribute type="xs:integer" name="view-size">
                <xs:annotation>
                    <xs:documentation>The number of items to display per page</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="row-count" />
            <xs:attribute name="use-row-submit" type="xs:boolean" default="false"/>
            <xs:attribute name="skip-start" type="xs:boolean" default="false"/>
            <xs:attribute name="skip-end" type="xs:boolean" default="false"/>
            <xs:attribute name="hide-header" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="odd-row-style">
                <xs:annotation>
                    <xs:documentation>The odd-row-style specifies the style to use in the table content odd rows.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="even-row-style">
                <xs:annotation>
                    <xs:documentation>The even-row-style specifies the style to use in the table content even rows.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="header-row-style">
                <xs:annotation>
                    <xs:documentation>The header-row-style specifies the style to use in the header of table.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-table-style">
                <xs:annotation>
                    <xs:documentation>The default-table-style specifies the style to use in the table.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="client-autocomplete-fields"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <!--
                not sure this is such a good idea <xs:attribute type="xs:string" name="hidden-values-map-name"> <xs:annotation> <xs:documentation>A map that contains hidden field name/value pairs. The reason for this is to eliminate the need to code custom forms so that auxiliary, passthru data can
                be sent to the server. By doing it this way, more standard forms can be used. </xs:documentation> </xs:annotation> </xs:attribute>
            -->
        </xs:complexType>
    </xs:element>
    <xs:element name="alt-target">
        <xs:complexType>
            <xs:attribute name="use-when" type="xs:string" use="required" />
            <xs:attribute name="target" type="xs:string" />
            <xs:attribute name="target-type" type="xs:string" />
        </xs:complexType>
    </xs:element>
    <xs:element name="alt-row-style">
        <xs:annotation>
            <xs:documentation>Active a style on a line if the use-when condition is validate</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="use-when" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>Boolean expression tested for active the style on a line.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="style" type="xs:string" use="required">
                <xs:annotation>
                    <xs:documentation>If use-when return true, concat this style to existing style of the line.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="page-script">
        <xs:annotation>
            <xs:documentation>SCIPIO: Spot to put extra javascript.
                Added 2017-04-21.</xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:attribute name="lang" default="javascript">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="javascript" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="preprocessor" default="none">
                <xs:annotation>
                    <xs:documentation>If preprocessor="flexible", flexible expressions are used to interpret the content.
                        Default: none (no preprocessing)</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="none" />
                        <xs:enumeration value="flexible" />
                        <!-- TODO: interpreted Freemarker support
                        <xs:enumeration value="ftl" />-->
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="auto-fields-service">
        <xs:complexType>
            <xs:attribute name="service-name" type="xs:string" use="required" />
            <xs:attribute name="map-name" type="xs:string" />
            <xs:attribute name="default-field-type" default="edit">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="edit" />
                        <xs:enumeration value="find" />
                        <xs:enumeration value="display" />
                        <xs:enumeration value="hidden" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="default-position" type="xs:positiveInteger" default="1" />
            <xs:attribute name="default-position-span" type="xs:integer">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Default position span for field elements for this form. 0 means auto or occupy all available positions. 1 means occupy one position grid space.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="attribs">
                <xs:annotation>
                    <xs:documentation>SCIPIO: A json-/freemarker-like object (map) of per-field extra attributes passed to the underlying theme implementation (template macros), for every field generated.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="auto-fields-entity">
        <xs:complexType>
            <xs:attribute name="entity-name" type="xs:string" use="required" />
            <xs:attribute name="map-name" type="xs:string" />
            <xs:attribute name="default-field-type" default="edit">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="edit" />
                        <xs:enumeration value="find" />
                        <xs:enumeration value="display" />
                        <xs:enumeration value="hidden" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:positiveInteger" name="default-position" default="1" />
            <xs:attribute name="default-position-span" type="xs:integer">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Default position span for field elements for this form. 0 means auto or occupy all available positions. 1 means occupy one position grid space.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="attribs">
                <xs:annotation>
                    <xs:documentation>SCIPIO: A json-/freemarker-like object (map) of per-field extra attributes passed to the underlying theme implementation (template macros), for every field generated.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="sort-order">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="sort-field" />
                <xs:element ref="last-field" />
                <xs:element ref="field-group" />
                <xs:element ref="banner" />
            </xs:choice>
            <xs:attribute name="type" default="explicit">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="explicit" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="field-group">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="sort-field" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="title">
                <xs:annotation>
                    <xs:documentation>A unique name for this fields group.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="collapsible">
                <xs:annotation>
                    <xs:documentation>Indicate in this fields group is collapsible or not, false by default.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="initially-collapsed">
                <xs:annotation>
                    <xs:documentation>Indicate in this fields group is initially collapsed or not, false by default. If set to true implies collapsible even if not set</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="id">
                <xs:annotation>
                    <xs:documentation>Set an unique CSS identifier to this fields group.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="style">
                <xs:annotation>
                    <xs:documentation>Set a CSS style to this fields group.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="banner">
        <xs:complexType>
            <xs:attribute type="xs:string" name="style" />
            <xs:attribute type="xs:string" name="text" />
            <xs:attribute type="xs:string" name="text-style" />
            <xs:attribute type="xs:string" name="left-text" />
            <xs:attribute type="xs:string" name="left-text-style" />
            <xs:attribute type="xs:string" name="right-text" />
            <xs:attribute type="xs:string" name="right-text-style" />
        </xs:complexType>
    </xs:element>
    <xs:element name="sort-field">
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="position" type="xs:positiveInteger">
                <xs:annotation>
                    <xs:documentation>Field position in grid.
                        SCIPIO: This is a STOCK attribute. Currently it is supported for "single" type forms, where it behaves like a real grid.
                        WARN: Currently this should be avoided for "list"- and "multi"-type forms; behavior may be problematic.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="position-span" type="xs:integer">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Position span for this field. 0 means auto or occupy all available positions. 1 means occupy one position grid space.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="last-field">
        <xs:annotation>
            <xs:documentation>last-field reorder the given field at the end form. This element is propagated to the inherited form</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="name" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>
    <!-- ================== Form Events ==================== -->
    <xs:element name="on-event-update-area">
        <xs:annotation>
            <xs:documentation>Area to be updated when a form event occurs.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="auto-parameters-service"/>
                <xs:element minOccurs="0" ref="auto-parameters-entity"/>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" />
            </xs:sequence>
            <xs:attribute name="event-type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="paginate" />
                        <xs:enumeration value="sort-column" />
                        <xs:enumeration value="submit" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="area-id" type="xs:string" use="required" />
            <xs:attribute name="area-target" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>

  <!-- ================== FIELDS ==================== -->
    <xs:element name="AllFields" abstract="true"/>
    <xs:element name="field">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="AllFields" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="on-field-event-update-area" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="name" use="required">
                <xs:annotation>
                    <xs:documentation>A unique name for this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="map-name">
                <xs:annotation>
                    <xs:documentation>The name (or location) of the map that contains the data for this field in the form context.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="entity-name">
                <xs:annotation>
                    <xs:documentation>Used along with the field-name to look up the entity field definition for any information that might be helpful when rendering the form field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="field-name">
                <xs:annotation>
                    <xs:documentation>See the description of entity-name.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="service-name">
                <xs:annotation>
                    <xs:documentation>Used along with the attribute-name to look up the service attribute definition for any information that might be helpful when rendering the form field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="attribute-name">
                <xs:annotation>
                    <xs:documentation>See the description of service-name.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="entry-name">
                <xs:annotation>
                    <xs:documentation>Defaults to the value of the name attribute; is used to specify the name of the entry in the map that contains the value to populate.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="parameter-name">
                <xs:annotation>
                    <xs:documentation>Defaults to the value of the name attribute; is the name of the parameter to use for this field (the request parameter in a web application).</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="title">
                <xs:annotation>
                    <xs:documentation>
                        The name of this field that will be shown to the user. 
                        It can use the ${} and foo.bar (dot) syntax to insert values from the context for parameterization or internationalization.
                        
                        Be sure a "FormFieldTitle_" labels does not already exist, else it will be overriden.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="header-link">
                <xs:annotation>
                    <xs:documentation>A link for this field in the header of a list form. Useful for sorting a list form by different columns.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="header-link-style">
                <xs:annotation>
                    <xs:documentation>The CSS style for a header-link.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="tooltip">
                <xs:annotation>
                    <xs:documentation>The text to show on mouse over or help for more information; can use the ${} and foo.bar (dot) syntax to insert values from the context for parameterization or internationalization.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="title-area-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the area around the title of this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="title-area-inline-style">
                <xs:annotation>
                    <xs:documentation>SCIPIO: The CSS style attributes to apply to the area around the title of this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="widget-area-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the area around the widget that the user will interact with for this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="title-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the title of this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="widget-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the widget that the user will interact with for this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="tooltip-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the tooltip of this field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:positiveInteger" name="position" default="1">
                <xs:annotation>
                    <xs:documentation>For row oriented forms (single type) can specify that the field should be put a column other than the first; for column oriented forms (list type) specifies the row the field should be put in.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="position-span" type="xs:integer">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Position span for this field. 0 means auto or occupy all available positions. 1 means occupy one position grid space.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="combine-previous" type="xs:boolean">
                <xs:annotation>
                    <xs:documentation>SCIPIO: If true, the field body will be combined with the previous field</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="red-when" default="by-name">
                <xs:annotation>
                    <xs:documentation>The widget/interaction part will be red if the date value is before-now (for thruDate), after-now (for fromDate), or by-name (if the field's name or entry-name or fromDate or thruDate the corresponding action will be done); only applicable when the field is a
                        timestamp.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="never" />
                        <xs:enumeration value="before-now" />
                        <xs:enumeration value="after-now" />
                        <xs:enumeration value="by-name" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="use-when" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        Used to specify a condition that must be true to use this field; the condition should be written using the
                        Java syntax and can operate on values in the form context; conditional fields are evaluated in reverse
                        order so the last field defined that evaluates to true is the one that is rendered.
            </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="ignore-when" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        This attribute is defined to enable ignoring a field on a form of type list or multi,
                        which is not possible using use-when attribute. Like use-when it should be written using java syntax.
                        The condition should be evaluated in the form context without looking for data coming from list that feeds the form.
                        SCIPIO: WARNING: 2018-09-04: This feature is currently not guaranteed to work in all cases due
                        to form widget renderer complexity (TODO: REVIEW).
                        </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="encode-output" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        This is for textual output only. If true data shown in fields will be encoded so that it does not interfere with markup of the target output.
                        For example, if output is HTML then data presented will be HTML encoded so that all HTML-specific characters are escaped.
            </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="event">
                <xs:annotation>
                    <xs:documentation>Used to specify a javascript event that may be attached to field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="action">
                <xs:annotation>
                    <xs:documentation>Used to specify a javascript action that should be run based on an existing specified event.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="id-name" />
            <xs:attribute name="separate-column" type="xs:boolean" default="false"/>
            <xs:attribute name="required-field" type="xs:boolean"/>
            <xs:attribute type="xs:string" name="required-field-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the title of this field if required.
                        Will default to form's default-required-field-style.
                        If field is required, but required-field-style is empty, an '*' will be placed to the right of text,
                        textarea and password fields.
                </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="sort-field" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="sort-field-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the sort field link.
                        Will default to form's default-sort-field-style.
                </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="sort-field-help-text">
                <xs:annotation>
                    <xs:documentation>Help text to be displayed when the mouse hovers over the column heading.
                </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="sort-field-asc-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the sort field link ordered ascending.
                        Will default to form's default-sort-field-asc-style.
                </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="sort-field-desc-style">
                <xs:annotation>
                    <xs:documentation>The name of a style (like a CSS class) to apply to the sort field link ordered descending.
                        Will default to form's default-sort-field-desc-style.
                </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="form-name">
                <xs:annotation>
                    <xs:documentation>
                        The name of the parent form, needed at least for lookups when using skip-start="true"
                        Must be set also on the related field if description-field-name is used 
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="tabindex">
                <xs:annotation>
                    <xs:documentation>
                        The HTML tabindex specifies the tab order of an element (when the "tab" button is used for navigating).
                        To exclude an element from the tab order, set the value of tabindex to 0
                        In that case the element is skipped when the user tabs around the form.
                        SCIPIO: NOTE: 2018-09-04: This may not be supported (by themes, yet). Merged 2018-09-04.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="condition-group">
                <xs:annotation>
                    <xs:documentation>
                        The condition-group regroup search criterias together.
                        Each group member will be gathered with AND operator
                        Every defined groups will be joined each other with OR operator
                        Any ungrouped condition will be added with AND operator
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="attribs">
                <xs:annotation>
                    <xs:documentation>SCIPIO: A json-/freemarker-like object (map) of per-field extra attributes passed to the underlying theme implementation (template macros).</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

  <!-- ================== FIELD TYPES ==================== -->
    <xs:element name="check" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="entity-options" />
                <xs:element ref="list-options" />
                <xs:element ref="option" />
            </xs:choice>
            <xs:attribute name="all-checked" type="xs:boolean"/>
            <xs:attribute name="disabled" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="no-current-selected-key">
                <xs:annotation>
                    <xs:documentation>SCIPIO: The key to mark as selected when there is no current entry value, or
                        in other words the default value.
                        2017-04-20: This has now been implemented for check field; it behaves as a default value (same 
                            as defaultValue parameter of @field macro in the Freemarker templating API).
                        2018-05-29: This option has been improved for more logical contextual sane behavior (heuristic).
                            In other words, it now mainly applies to "new" record screens where no errors occurred.
                            In order to prevent unintentionally modifying fields of existing records and 
                            after failed form submits, no-current-selected-key no longer applies to:
                                1) list or multi forms
                                2) error requests (form submits that trigger an error and form is reloaded from parameters)
                                3) existing records (when map-name/default-map-name refers to non-null record, even if field is null)
                                4) when useRequestParameters is forced true and the parameter is non-null
                                5) when there is no map-name/default-map-name and the context field is non-null
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="key">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Key value for single check field (with multiple checkbox, used as key value where unspecified).
                        (Corresponds to the "value" parameter of the @field macro from Freemarker templating API).
                        Default: "Y"
                        Added 2017-04-20.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="alt-key">
                <xs:annotation>
                    <xs:documentation>SCIPIO: Alt key value for single check field (with multiple checkbox, used as alt key value where unspecified).
                        NOTE: if specified, this automatically implies use-hidden="true" (unless explicitly set false, in which case this is ignored).
                        (Corresponds to the "altValue" parameter of the @field macro from Freemarker templating API).
                        Default: If use-hidden="true", "N"; otherwise, none (empty)
                        Added 2017-04-20.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:boolean" name="use-hidden">
                <xs:annotation>
                    <xs:documentation>SCIPIO: (boolean) If true, checkbox alt-key will be submitted when the check field is off using hidden inputs.
                        Requires dynamic script (javascript).
                        Default: true if alt-key is specified (even if empty); false otherwise.
                        NOTE: to prevent submitting empty value, 
                        Added 2017-04-20.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="container" substitutionGroup="AllFields">
        <xs:complexType />
    </xs:element>
    <xs:element name="date-find" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute name="type" default="timestamp">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="timestamp" />
                        <xs:enumeration value="date" />
                        <xs:enumeration value="time" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="default-option-from" default="equals">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="sameDay" />
                        <xs:enumeration value="greaterThanFromDayStart" />
                        <xs:enumeration value="greaterThan" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="default-option-thru" default="lessThan">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="lessThan" />
                        <xs:enumeration value="upToDay" />
                        <xs:enumeration value="upThruDay" />
                        <xs:enumeration value="empty" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="date-time" substitutionGroup="AllFields">
        <xs:annotation>
            <xs:documentation>
                A special entry for date-time fields; may just have a default size text
                entry box and some sort of widget to make date entry/selection easier.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="type" default="timestamp">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="timestamp" />
                        <xs:enumeration value="date" />
                        <xs:enumeration value="time" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="input-method" default="text">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="text" />
                        <xs:enumeration value="time-dropdown" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="clock" default="24">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="12" />
                        <xs:enumeration value="24" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="step" default="1">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="1" />
                        <xs:enumeration value="5" />
                        <xs:enumeration value="10" />
                        <xs:enumeration value="15" />
                        <xs:enumeration value="30" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="mask" default="N">
                <xs:annotation>
                    <xs:documentation>Will use the type value if set to yes, add a masked input</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="Y" />
                        <xs:enumeration value="N" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="placeholder" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Specifies a short hint that describes the expected value of an input field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="display" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="in-place-editor" minOccurs="0" maxOccurs="1" />
            </xs:sequence>
            <xs:attribute name="also-hidden" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="description">
                <xs:annotation>
                    <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:integer" name="size">
                <xs:annotation>
                    <xs:documentation>Specifies the size of the field (as a number of characters), when the text to display exceed the given size it is truncated and add the complete text as a hint</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="type" default="text">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="text" />
                        <xs:enumeration value="currency" />
                        <xs:enumeration value="date">
                            <xs:annotation>
                                <xs:documentation>Display only the date part of a timestamp field</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="date-time">
                            <xs:annotation>
                                <xs:documentation>Display only the date and hours:minutes part of a timestamp field</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="image">
                            <xs:annotation>
                                <xs:documentation>Display the image specified in image-location</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="accounting-number">
                            <xs:annotation>
                                <xs:documentation>Display negatives in parentheses (configurable, see arithmetic.properties)</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="currency">
                <xs:annotation>
                    <xs:documentation>Specifies the currency uom ID used to format context value, should generally use the ${} syntax to retrieve value.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="image-location">
                <xs:annotation>
                    <xs:documentation>Specifies the image to display.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="default-value">
                <xs:annotation>
                    <xs:documentation>Specifies a string to be displayed if the field is empty.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="display-entity" substitutionGroup="AllFields">
        <xs:annotation>
            <xs:documentation>
                This is just like display but looks up a description using the Entity Engine; 
                note that if also-hidden is true then it uses the key as the value, not the shown description.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
            <xs:attribute type="xs:string" name="key-field-name" />
            <xs:attribute type="xs:string" name="description" default="${description}" />
            <xs:attribute type="xs:integer" name="size">
                <xs:annotation>
                    <xs:documentation>
                        Specifies the size of the field (as a number of characters), 
                        when the text to display exceed the given size it is truncated and add the complete text as a hint
                     </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="cache" type="xs:boolean" default="true"/>
            <xs:attribute name="also-hidden" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="drop-down" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="auto-complete" minOccurs="0" maxOccurs="1" />
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element ref="entity-options" />
                    <xs:element ref="list-options" />
                    <xs:element ref="option" />
                </xs:choice>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute name="allow-empty" type="xs:boolean" default="false"/>
            <xs:attribute name="allow-multiple" type="xs:boolean" default="false"/>
            <xs:attribute name="current" default="first-in-list">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="first-in-list" />
                        <xs:enumeration value="selected" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="no-current-selected-key">
                <xs:annotation>
                    <xs:documentation>The key to mark as selected when there is no current entry value.
                        SCIPIO: 2018-05-29: This option has been improved for more logical contextual sane behavior (heuristic).
                            In other words, it now mainly applies to "new" record screens where no errors occurred.
                            In order to prevent unintentionally modifying fields of existing records and 
                            after failed form submits, no-current-selected-key no longer applies to:
                                1) list or multi forms
                                2) error requests (form submits that trigger an error and form is reloaded from parameters)
                                3) existing records (when map-name/default-map-name refers to non-null record, even if field is null)
                                4) when useRequestParameters is forced true and the parameter is non-null
                                5) when there is no map-name/default-map-name and the context field is non-null
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:integer" name="size" default="1" />
            <xs:attribute type="xs:string" name="current-description" />
            <xs:attribute type="xs:integer" name="other-field-size" default="0">
                <xs:annotation>
                    <xs:documentation>If non-zero, a text field will conditionally show
                        next to the select control to implement a crude "combo box".
                        In order for this to work there must be a option in the select as:
                        &lt;option key=&quot;_OTHER_&quot; description=&quot;Specify other&quot;/&gt;
                        - with '_OTHER_' being required and any 'description' allowed.
                        In order to use this feature, the javascript code contained in the file:
                        images/webapp/images/combobox.js must be included in the page.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:integer" name="text-size">
                <xs:annotation>
                    <xs:documentation>Specifies the size of the field (as a number of characters), when the text to display exceed the given size it is truncated and add the complete text as a hint</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="file" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:positiveInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="hidden" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:string" name="value" />
        </xs:complexType>
    </xs:element>
    <xs:complexType name="hyperlink">
        <xs:complexContent>
            <xs:extension base="link">
                <xs:attribute type="xs:string" name="description">
                    <xs:annotation>
                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="also-hidden" type="xs:boolean" default="true">
                    <xs:annotation>
                        <xs:documentation>If set to true, an hidden form field is also rendered, with the name of the field and its content.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <!-- These attributes have been replaced by the image element -->
                <xs:attribute type="xs:string" name="alternate">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute type="xs:string" name="image-title">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute type="xs:string" name="image-location">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the image element.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="target-type" default="intra-app">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the url-mode attribute.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                        <xs:restriction base="xs:token">
                            <xs:enumeration value="intra-app" />
                            <xs:enumeration value="inter-app" />
                            <xs:enumeration value="content" />
                            <xs:enumeration value="plain" />
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="hyperlink" type="hyperlink" substitutionGroup="AllFields"/>
    <xs:element name="ignored" substitutionGroup="AllFields">
        <xs:complexType/>
    </xs:element>
    <xs:element name="image" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="style" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute type="xs:string" name="description" />
            <xs:attribute type="xs:string" name="alternate" />
        </xs:complexType>
    </xs:element>
    <xs:element name="lookup" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="target-form-name" use="required" />
            <xs:attribute type="xs:nonNegativeInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute type="xs:string" name="description-field-name">
                <xs:annotation>
                    <xs:documentation>
                        The name of a field whose value is also filled when coming back from lookup selection.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="target-parameter">
                <xs:annotation>
                    <xs:documentation>The name of a field whose value is passed in as a parameter to the lookup target form. 
                        Can be a comma separated list. You need to affect it the value using parameters.parmI 
                        (where I is the position number in the list, I must begin at 0) in the related lookup screen. 
                        See LookupPreferredContactMech as example
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>
                        Tells the browser whether or not to try and autocomplete with values previously entered. 
                        Default to true.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="read-only" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>Makes the input field related to this lookup read-only (no edits allowed)</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="presentation" default="layer">
                <xs:annotation>
                    <xs:documentation>
                        Shows the lookup as moveable and resizable layer or popup window. 
                        if set to none only autocompletion is active (no lookup form would be call)
                        Default to layer.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="layer" />
                        <xs:enumeration value="window" />
                        <xs:enumeration value="none" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="height">
                <xs:annotation>
                    <xs:documentation>Only layer height. I.e. 250px, 12%</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="width">
                <xs:annotation>
                    <xs:documentation>Only layer width. I.e. 250px, 12%</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="position" default="topleft">
                <xs:annotation>
                    <xs:documentation>Only for layer positionining. Default to topleft corner.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="center" />
                        <xs:enumeration value="left" />
                        <xs:enumeration value="right" />
                        <xs:enumeration value="topleft" />
                        <xs:enumeration value="topright" />
                        <xs:enumeration value="topcenter" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="fade-background" type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>If true the window background will be faded, default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="initially-collapsed" type="xs:boolean"
                          default="false">
                <xs:annotation>
                    <xs:documentation>If true the search screenlet is collapsed intially, default to false.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="show-description" type="xs:boolean">
                <xs:annotation>
                    <xs:documentation>If true, a special span with css class "tooltip" will be created at right of the lookup button 
                        and a description will fill in. 
                        If not set then it depends on the "widget.lookup.showDescription" setting.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="include-menu" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required" />
            <xs:attribute type="xs:string" name="location" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-form" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required" />
            <xs:attribute type="xs:string" name="location" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-grid" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required" />
            <xs:attribute type="xs:string" name="location" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="include-screen" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required" />
            <xs:attribute type="xs:string" name="location" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="password" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:positiveInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="radio" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="entity-options" />
                <xs:element ref="list-options" />
                <xs:element ref="option" />
            </xs:choice>
            <xs:attribute type="xs:string" name="no-current-selected-key">
                <xs:annotation>
                    <xs:documentation>The key to mark as selected when there is no current entry value.
                        SCIPIO: 2018-05-29: This option has been improved for more logical contextual sane behavior (heuristic).
                            In other words, it now mainly applies to "new" record screens where no errors occurred.
                            In order to prevent unintentionally modifying fields of existing records and 
                            after failed form submits, no-current-selected-key no longer applies to:
                                1) list or multi forms
                                2) error requests (form submits that trigger an error and form is reloaded from parameters)
                                3) existing records (when map-name/default-map-name refers to non-null record, even if field is null)
                                4) when useRequestParameters is forced true and the parameter is non-null
                                5) when there is no map-name/default-map-name and the context field is non-null
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="range-find" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:positiveInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="default-option-from" default="greaterThanEqualTo">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="greaterThan" />
                        <xs:enumeration value="greaterThanEqualTo" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="default-option-thru" default="lessThanEqualTo">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="lessThan" />
                        <xs:enumeration value="lessThanEqualTo" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="reset" substitutionGroup="AllFields">
        <xs:complexType/>
    </xs:element>
    <xs:element name="submit" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute name="button-type" default="button">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="button" />
                        <xs:enumeration value="text-link" />
                        <xs:enumeration value="image" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="image-location" />
            <xs:attribute type="xs:string" name="background-submit-refresh-target">
                <xs:annotation>
                    <xs:documentation>Deprecated. Use the on-event-update-area element
                        instead.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="request-confirmation"
                          type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="confirmation-message" type="xs:string">
                <xs:annotation>
                    <xs:documentation>The message displayed in confirmation box</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="text" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:positiveInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="disabled" type="xs:boolean" default="false"/>
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="mask" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Defines a customized input mask. Use 9 for numeric, a for alpha and * for alphanumeric character.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="read-only" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>Makes this text field read-only (no edits allowed)</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="placeholder" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Specifies a short hint that describes the expected value of an input field.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="textarea" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:attribute type="xs:positiveInteger" name="cols" default="60" />
            <xs:attribute type="xs:positiveInteger" name="rows" default="3" />
            <xs:attribute type="xs:positiveInteger" name="maxlength"/>
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="read-only" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>Makes this textarea read-only (no edits allowed)</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="visual-editor-enable"
                          type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation>This will enable the html editor on this text area from www.unverse.net (more info there), only one textarea can be used on one page</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="visual-editor-buttons">
                <xs:annotation>
                    <xs:documentation>In here you can specify which buttons you want to see and in which order separated by blanks. Available buttons are:formatblock fontname fontsize newline bold italic underline left center right number bullet indent outdent undo redo color hilite rule link image
                        table clean html spellcheck |(separator) Default is that all buttons are shown</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="text-find" substitutionGroup="AllFields">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="sub-hyperlink" />
            </xs:sequence>
            <xs:attribute type="xs:positiveInteger" name="size" default="25" />
            <xs:attribute type="xs:positiveInteger" name="maxlength" />
            <xs:attribute type="xs:string" name="default-value" />
            <xs:attribute name="ignore-case" type="xs:boolean" default="true"/>
            <xs:attribute name="default-option" default="contains">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="like" /><!-- this is actually "begins with" -->
                        <xs:enumeration value="contains" />
                        <xs:enumeration value="empty" />
                        <xs:enumeration value="notEqual" />
                        <xs:enumeration value="lessThan" />
                        <xs:enumeration value="lessThanEqualTo" />
                        <xs:enumeration value="greaterThan" />
                        <xs:enumeration value="greaterThanEqualTo" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="client-autocomplete-field"
                          type="xs:boolean" default="true">
                <xs:annotation>
                    <xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="hide-options" default="false">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="true" />
                        <xs:enumeration value="false" />
                        <xs:enumeration value="ignore-case" />
                        <xs:enumeration value="options" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <!-- ================== Field Events ==================== -->
    <xs:element name="on-field-event-update-area">
        <xs:annotation>
            <xs:documentation>Area to be updated when a field event occurs.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="event-type" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="change" />
                        <xs:enumeration value="click" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="area-id" use="required" />
            <xs:attribute type="xs:string" name="area-target" use="required" />
        </xs:complexType>
    </xs:element>

    <!-- ================== FIELD SUB-ELEMENTS ==================== -->
    <xs:element name="auto-complete">
        <xs:complexType>
            <xs:attribute name="auto-select" type="xs:boolean" default="false"/>
            <xs:attribute name="frequency" type="xs:double" default="0.4" />
            <xs:attribute name="min-chars" type="xs:positiveInteger" default="1" />
            <xs:attribute name="choices" type="xs:positiveInteger" default="10" />
            <xs:attribute name="partial-search" type="xs:boolean" default="true"/>
            <xs:attribute name="partial-chars" type="xs:positiveInteger" default="1" />
            <xs:attribute name="ignore-case" type="xs:boolean" default="true"/>
            <xs:attribute name="full-search" type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="entity-constraint">
        <xs:complexType>
            <xs:attribute type="xs:string" name="name" use="required" />
            <xs:attribute name="operator" default="equals">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="less" />
                        <xs:enumeration value="greater" />
                        <xs:enumeration value="less-equals" />
                        <xs:enumeration value="greater-equals" />
                        <xs:enumeration value="equals" />
                        <xs:enumeration value="not-equals" />
                        <xs:enumeration value="in" />
                        <xs:enumeration value="not-in" />
                        <xs:enumeration value="between" />
                        <xs:enumeration value="like" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="env-name" />
            <xs:attribute type="xs:string" name="value" />
            <xs:attribute name="ignore-if-null" type="xs:boolean" default="false"/>
            <xs:attribute name="ignore-if-empty" type="xs:boolean" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="entity-options">
        <xs:annotation>
            <xs:documentation>entity-options will look up options for the field in the given entity</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="entity-constraint" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="entity-order-by" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
            <xs:attribute type="xs:string" name="key-field-name">
                <xs:annotation>
                    <xs:documentation>The name of the field in the looked up entity that will be used for the key value; if empty defaults to the entry-name of the field this is in.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="description" default="${description}">
                <xs:annotation>
                    <xs:documentation>Will be presented to the user with field values substituted using the ${} syntax.
                        SCIPIO: NOTE: 2018-09-04: The default was changed to "${description}" (instead of required). Merged 2018-09-04.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="cache" type="xs:boolean" default="true"/>
            <xs:attribute name="filter-by-date" default="by-name">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="true" />
                        <xs:enumeration value="false" />
                        <xs:enumeration value="by-name" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="entity-order-by">
        <xs:complexType>
            <xs:attribute type="xs:string" name="field-name" use="required" />
        </xs:complexType>
    </xs:element>
    <xs:element name="in-place-editor">
        <xs:annotation>
            <xs:documentation>Enables in place editon for the display field.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:choice minOccurs="1" maxOccurs="1">
                    <xs:element ref="simple-editor" />
                </xs:choice>
                <xs:element ref="field-map" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
            <xs:attribute name="url" type="xs:string" use="required" />
            <xs:attribute name="cancel-control">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="link" />
                        <xs:enumeration value="button" />
                        <xs:enumeration value="false" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="cancel-text" type="xs:string" />
            <xs:attribute name="click-to-edit-text" type="xs:string" />
            <xs:attribute name="field-post-creation">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="activate" />
                        <xs:enumeration value="focus" />
                        <xs:enumeration value="false" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="form-class-name" type="xs:string" />
            <xs:attribute name="form-id" type="xs:string" />
            <xs:attribute name="highlight-color" type="xs:string" />
            <xs:attribute name="highlight-end-color" type="xs:string" />
            <xs:attribute name="hover-class-name" type="xs:string" />
            <xs:attribute name="html-response" type="xs:boolean" default="false"/>
            <xs:attribute name="loading-class-name" type="xs:string" />
            <xs:attribute name="loading-text" type="xs:string" />
            <xs:attribute name="ok-control">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="link" />
                        <xs:enumeration value="button" />
                        <xs:enumeration value="false" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="ok-text" type="xs:string" />
            <xs:attribute name="param-name" type="xs:string" />
            <xs:attribute name="saving-class-name" type="xs:string" />
            <xs:attribute name="saving-text" type="xs:string" />
            <xs:attribute name="submit-on-blur" type="xs:boolean"/>
            <xs:attribute name="text-after-controls" type="xs:string" />
            <xs:attribute name="text-before-controls" type="xs:string" />
            <xs:attribute name="text-between-controls" type="xs:string" />
            <xs:attribute name="update-after-request-call"
                          type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="list-options">
        <xs:annotation>
            <xs:documentation>list-options will create options based on data in a list</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute type="xs:string" name="list-name" use="required">
                <xs:annotation>
                    <xs:documentation>The name of the list to iterate through to get values.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="list-entry-name">
                <xs:annotation>
                    <xs:documentation>
                        If specified the list entry will be placed in the local
                        context, otherwise each list entry must be a Map that will be expanded
                        into the local context.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="key-name" use="required">
                <xs:annotation>
                    <xs:documentation>
                        The value of the key-name will be the value passed
                        to the server; this should be the full name of the location of the
                        key value in the context, given the list-entry-name or expanded
                        list-entry Map as the options you would most likely use.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="alt-key-name">
                <xs:annotation>
                    <xs:documentation>SCIPIO: CHECK FIELD ONLY: Alternate key name (new 2017-04-20). 
                        2017-04-20: Currently only used for checkboxes, for the "off" state.
                        Corresponds to the "altValue" map argument in the "items" argument of the @field macro of the Freemarker templating API.
                        NOTE: If this resolves to a non-empty value, then special input hidden logic to submit the alt value is automatically employed.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="description" default="${description}">
                <xs:annotation>
                    <xs:documentation>Will be presented to the user with field values substituted using the ${} syntax.
                        SCIPIO: NOTE: 2018-09-04: The default was changed to "${description}". Merged 2018-09-04.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="option">
        <xs:complexType>
            <xs:attribute type="xs:string" name="key" use="required" />
            <xs:attribute type="xs:string" name="alt-key">
                <xs:annotation>
                    <xs:documentation>SCIPIO: CHECK FIELD ONLY: Alternate key (new 2017-04-20). 
                        2017-04-20: Currently only used for checkboxes, for the "off" state.
                        Corresponds to the "altValue" map argument in the "items" argument of the @field macro of the Freemarker templating API.
                        NOTE: If this is specified, then special input hidden logic to submit the alt value is automatically employed.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute type="xs:string" name="description">
                <xs:annotation>
                    <xs:documentation>What the user will see in the widget; defaults to the value of the key attribute.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="simple-editor">
        <xs:complexType>
            <xs:attribute name="rows" type="xs:positiveInteger" default="1" />
            <xs:attribute name="cols" type="xs:positiveInteger" default="40" />
        </xs:complexType>
    </xs:element>
    <xs:complexType name="sub-hyperlink">
        <xs:complexContent>
            <xs:extension base="link">
                <xs:attribute type="xs:string" name="description">
                    <xs:annotation>
                        <xs:documentation>Specifies the string to display, can use the ${} syntax to insert context values; if empty the value of the field will be printed for a default.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <!-- SCIPIO: NOTE: This is now already defined on the base link.
                    Note that this version supports Groovy conditions (without ${}).
                <xs:attribute type="xs:string" name="use-when" />-->
                <xs:attribute name="target-type" default="intra-app">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the url-mode attribute.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                        <xs:restriction base="xs:token">
                            <xs:enumeration value="intra-app" />
                            <xs:enumeration value="inter-app" />
                            <xs:enumeration value="content" />
                            <xs:enumeration value="plain" />
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="link-style" type="xs:string">
                    <xs:annotation>
                        <xs:documentation>Deprecated - use the style attribute.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:element name="sub-hyperlink" type="sub-hyperlink"/>

  <!-- ================== ACTIONS ==================== -->
    <xs:element name="actions">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="AllActions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="row-actions">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="AllActions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="service" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-map" />
            </xs:sequence>
            <xs:attribute type="xs:string" name="service-name" use="required" />
            <xs:attribute type="xs:string" name="result-map" />
            <xs:attribute type="xs:string" name="auto-field-map" default="true">
                <xs:annotation>
                    <xs:documentation>This can be "true", "false" or the name of a Map in the context to use as the source Map for the service context.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <!-- this is deprecated and should not be used; use result-map-list-name instead: <xs:attribute type="xs:string" name="result-map-list-iterator-name"/> -->
            <xs:attribute type="xs:string" name="result-map-list" />
            <xs:attribute name="ignore-error" type="xs:boolean" default="false"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="call-parent-actions" substitutionGroup="AllActions" />
    <xs:element name="entity-and" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-map" /><!-- SCIPIO: 2018-12-05: Support no filter, find all (minOccurs="0") -->
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="order-by" />
                <xs:choice minOccurs="0">
                    <xs:element ref="limit-range" />
                    <xs:element ref="limit-view" />
                    <xs:element ref="use-iterator" />
                </xs:choice>
            </xs:sequence>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
            <xs:attribute name="use-cache" type="xs:boolean" default="false"/>
            <xs:attribute name="filter-by-date" default="false">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="true" />
                        <xs:enumeration value="false" />
                        <xs:enumeration value="by-name" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute type="xs:string" name="list" />
            <xs:attribute name="result-set-type" default="scroll">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="forward" />
                        <xs:enumeration value="scroll" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="entity-condition" substitutionGroup="AllActions">
        <xs:complexType>
            <xs:sequence>
                <xs:choice minOccurs="0">
                    <xs:element ref="condition-expr" />
                    <xs:element ref="condition-list" />
                    <xs:element ref="condition-object" />
                </xs:choice>
                <xs:element minOccurs="0" ref="having-condition-list" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" />
                <xs:element minOccurs="0" maxOccurs="unbounded" ref="order-by" />
                <xs:choice minOccurs="0">
                    <xs:element ref="limit-range" />
                    <xs:element ref="limit-view" />
                    <xs:element ref="use-iterator" />
                </xs:choice>
            </xs:sequence>
            <xs:attribute type="xs:string" name="entity-name" use="required" />
            <xs:attribute name="use-cache" type="xs:boolean" default="false"/>
            <xs:attribute name="filter-by-date" default="false">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="true" />
                        <xs:enumeration value="false" />
                        <xs:enumeration value="by-name" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="distinct" type="xs:boolean" default="false"/>
            <xs:attribute type="xs:string" name="delegator-name" />
            <xs:attribute type="xs:string" name="list" />
            <xs:attribute name="result-set-type" default="scroll">
                <xs:simpleType>
                    <xs:restriction base="xs:token">
                        <xs:enumeration value="forward" />
                        <xs:enumeration value="scroll" />
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
</xs:schema>