<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/tagging-preset-1.0"
    xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0"
    elementFormDefault="qualified">

    <!-- Localized attributes (for example de.description are not supported
        by xsd, so every element needs <anyAttribute/> To cover at least some common
        errors, elements have specified prohibited attributes -->

    <element name="annotations" type="tns:root" />
    <element name="presets" type="tns:root">
        <unique name="chunk_id">
            <selector xpath=".//tns:chunk"/>
            <field xpath="@id"/>
        </unique>
        <keyref name="chunk_ref" refer="tns:chunk_id">
            <selector xpath=".//tns:reference"/>
            <field xpath="@ref"/>
        </keyref>
    </element>

    <complexType name="root">
        <annotation>
            <documentation>
                Has to be the main tag of the file.
            </documentation>
        </annotation>
        <complexContent>
            <extension base="tns:group-parent">
                <attribute name="author" type="string">
                    <annotation>
                        <documentation>
                            The name of the author of the preset.
                        </documentation>
                    </annotation>
                </attribute>
                <attribute name="version" type="string">
                    <annotation>
                        <documentation>
                            The version number of the file. For automatic version adjustment of presets managed in this wiki you have to use two internal variables: [[revision]] (the latest version number of the wiki page) and [[date]] (the date of the last edit), e.g. version="1.[[revision]]_[[date]]".
                        </documentation>
                    </annotation>
                </attribute>
                <attribute name="shortdescription" type="string">
                    <annotation>
                        <documentation>
                            Very short overview description i.e. the "name" of the preset.
                            <br/>
                            May be localized (i.e. de.shortdescription)
                        </documentation>
                    </annotation>
                </attribute>
                <attribute name="description" type="string">
                    <annotation>
                        <documentation>
                            Description what the file contains.
                            <br/>
                            May be localized (i.e. de.description)
                        </documentation>
                    </annotation>
                </attribute>
                <attribute name="link" type="string">
                    <annotation>
                        <documentation>
                            Web link to further details.
                            <br/>
                            May be localized (i.e. de.link)
                        </documentation>
                    </annotation>
                </attribute>
                <attribute name="baselanguage" type="string">
                    <annotation>
                        <documentation>
                            When the base language is not English, specify it here (using non English preset texts will prevent automatic translation, once it is implemented (#11392)).
                        </documentation>
                    </annotation>
                </attribute>

                <anyAttribute processContents="skip" />
            </extension>
        </complexContent>
    </complexType>

    <complexType name="group-parent">
        <sequence>
            <choice minOccurs="1" maxOccurs="unbounded">
                <element name="chunk" type="tns:chunk"/>
                <element name="group" type="tns:group" />
                <element name="item" type="tns:item" />
                <element name="separator" type="tns:separator" />
            </choice>
        </sequence>
        <attributeGroup ref="tns:attributes.icon" />

        <attribute name="type" use="prohibited" />
        <attribute name="text" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="group">
        <annotation>
            <documentation>
                Used to group items in sub menus. name is required, icon is optional attribute.
            </documentation>
        </annotation>
        <complexContent>
            <extension base="tns:group-parent">
                <attributeGroup ref="tns:attributes.name" />
                <attributeGroup ref="tns:attributes.regions"/>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="separator">
        <annotation>
            <documentation>
                Insert a line separator into the menu.
            </documentation>
        </annotation>
    </complexType>

    <complexType name="item">
        <annotation>
            <documentation>
                Every item is one annotation set to select from. name is required, type and preset_name_label are recommended and icon, name_template, regions and exclude_regions are optional attributes.
            </documentation>
        </annotation>
        <sequence>
            <choice minOccurs="0" maxOccurs="unbounded">
                <group ref="tns:optional_elements" />
                <element name="key" type="tns:key" />
                <element name="optional" type="tns:optional" minOccurs="0" />
            </choice>
            <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
        </sequence>
        <attributeGroup ref="tns:attributes.name" />
        <attributeGroup ref="tns:attributes.icon" />
        <attributeGroup ref="tns:attributes.regions"/>
        <attribute name="type" type="string">
            <annotation>
                <documentation><![CDATA[
                    When specified, only objects of the given type will work with this tagging preset. Can be "node", "way", "closedway", "multipolygon", "relation" or any comma separated combination of them. Note that "multipolygon" is not included in "relation", so if the preset should apply for multipolygons and other relation types, you need to specify both: "multipolygon,relation". Also used in the <role> tag to specify which object types are allowed for a specific relation member.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="name_template" type="string">
            <annotation>
                <documentation>
                    Custom name formatter for OSM primitives matching this preset. See #name_templatedetails for details.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="name_template_filter" type="string">
            <annotation>
                <documentation>
                    Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or the Selection).
                </documentation>
            </annotation>
        </attribute>
        <attribute name="match_expression" type="string">
            <annotation>
                <documentation>
                    Additional criteria for matching primitives. Specified in <a href="https://josm.openstreetmap.de/wiki/Help/Action/Search">JOSM search syntax</a>.
                    For instance, a preset with <code>match_expression="foo=bar"</code> requires OSM objects to have the tag <code>foo=bar</code>.
                    You may want to use the <code>match_expression</code> to exclude certain OSM objects, for instance when a more specific preset is present.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="preset_name_label" type="boolean">
            <annotation>
                <documentation>
                    Whether to insert "[preset name]" label in dialog (defaults to "false" for backward-compatibility on external presets).
                </documentation>
            </annotation>
        </attribute>

        <attribute name="text" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="optional">
        <annotation>
            <documentation><![CDATA[
                Used to group some optional elements of an item. The text attribute is optional. If used without text then this is equivalent to <space ><label text="Optional Attributes:" /><space />
            ]]></documentation>
        </annotation>
        <group ref="tns:optional_elements" maxOccurs="unbounded" />
        <attributeGroup ref="tns:attributes.text" />
    </complexType>

    <complexType name="chunk">
        <annotation>
            <documentation>
                To define a template of elements for later (repeated) use. The id attribute is mandatory.
            </documentation>
        </annotation>
        <choice minOccurs="1" maxOccurs="1">
            <sequence>
                <choice minOccurs="1" maxOccurs="unbounded">
                    <group ref="tns:optional_elements" />
                    <element name="key" type="tns:key" />
                    <element name="optional" type="tns:optional" minOccurs="0" />
                    <element name="roles" type="tns:roles" minOccurs="0" />
                </choice>
            </sequence>
            <sequence>
                <!-- Cannot use tns:list_elements here because reference is present both in optional_elements and list_elements
                so it violates cos-nonambig: Unique Particle Attribution :
                <group ref="tns:list_elements" minOccurs="1" maxOccurs="unbounded" />-->
                <element name="list_entry" type="tns:list_entry" minOccurs="1" maxOccurs="unbounded" />
            </sequence>
            <sequence>
                <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
            </sequence>
        </choice>
        <attribute name="id" type="ID" use="required">
            <annotation>
                <documentation><![CDATA[
                    The unique identifier for this <chunk>.
                ]]></documentation>
            </annotation>
        </attribute>
    </complexType>

    <complexType name="reference">
        <attribute name="ref" type="IDREF" use="required" />
    </complexType>

    <group name="optional_elements">
        <choice>
            <element name="label" type="tns:label" />
            <element name="space" type="tns:space" />
            <element name="link" type="tns:link" />
            <element name="preset_link" type="tns:preset_link" />
            <element name="text" type="tns:text" />
            <element name="combo" type="tns:combo" />
            <element name="multiselect" type="tns:multiselect" />
            <element name="checkgroup" type="tns:checkgroup" />
            <element name="check" type="tns:check" />
            <element name="item_separator" type="tns:separator" />
            <element name="reference" type="tns:reference" />
        </choice>
    </group>

    <group name="list_elements">
        <choice>
            <element name="list_entry" type="tns:list_entry" />
            <element name="reference" type="tns:reference" />
        </choice>
    </group>

    <complexType name="key">
        <annotation>
            <documentation>
                This tag will always set a key to a specific value. key is required and if value is present, the key will be set. If value attribute is omitted, the key is removed. The match attribute is optional.
            </documentation>
        </annotation>
        <attribute name="key" type="string" use="required">
            <annotation>
                <documentation>
                    This specifies the property key that will be modified by the item.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="value" type="string">
            <annotation>
                <documentation><![CDATA[
                    Specify a value to be entered in the <key> tag.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="match" type="tns:match" />
    </complexType>

    <complexType name="link">
        <annotation>
            <documentation>
                Specify a web link for this feature or to anything else of use. Either the wiki (referring to an OSM wiki page, e.g. "Tag:leisure=park") or the href (full URL) attribute is required. When the wiki attribute is used the link points to the wiki page of the language JOSM is set to. If it doesn't exist the English page is shown.
            </documentation>
        </annotation>
        <attribute name="wiki" type="string" />
        <attribute name="href" type="string" />
        <attributeGroup ref="tns:attributes.text" />
        <attributeGroup ref="tns:attributes.icon" />

        <attribute name="name" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="preset_link">
        <annotation>
            <documentation><![CDATA[
                Adds a link to an other preset with a label on top. The preset_name attribute is required, text to override the label (default is "Edit also …") and text_context are optional. A sequence of <preset_link /> without text or a identical text value are grouped below one label. Watch out for presets with identical name as it is not predictable to which preset the link will lead to, see #12716.
            ]]></documentation>
        </annotation>
        <attribute name="preset_name" type="string" use="required">
            <annotation>
                <documentation>
                    The exact name of the preset to link to.
                </documentation>
            </annotation>
        </attribute>
        <attributeGroup ref="tns:attributes.text" />
        <attribute name="name" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="label">
        <annotation>
            <documentation>
                Labels are static texts for display. text is a required attribute, icon and icon_size are optional.
            </documentation>
        </annotation>
        <attributeGroup ref="tns:attributes.text" />
        <attributeGroup ref="tns:attributes.icon" />

        <attribute name="name" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="space">
        <annotation>
            <documentation>
                Add some space (i.e. a newline).
            </documentation>
        </annotation>
    </complexType>

    <complexType name="text">
        <attributeGroup ref="tns:attributes.key" />
        <attributeGroup ref="tns:attributes.text" />
        <attributeGroup ref="tns:attributes.icon" />
        <attribute name="use_last_as_default" type="tns:last_default" />
        <attribute name="auto_increment" type="string">
            <annotation>
                <documentation><![CDATA[
                    May contain a comma separated list of integer increments or decrements, e.g. "-2,-1,+1,+2". A button will be shown next to the <text /> field for each value, allowing the user to select auto-increment with the given stepping. Auto-increment only happens if the user selects it. There is also a button to deselect auto-increment. Default is no auto-increment. Mutually exclusive with use_last_as_default.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="match" type="tns:match" />
        <attributeGroup ref="tns:attributes.length" />
        <attributeGroup ref="tns:attributes.regions"/>
        <attribute name="alternative_autocomplete_keys" type="string">
            <annotation>
                <documentation><![CDATA[
                    A comma separated list of alternative keys to use for auto completion of <text>.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="value_template" type="string">
            <annotation>
                <documentation><![CDATA[
                    A template to generate the value automatically based on other <text> values of this preset.
                    For instance, "Bus {ref}: {from} → {to}" can be used to generate the name of a bus route relation.
                ]]></documentation>
            </annotation>
        </attribute>

        <attribute name="type" use="prohibited" />
        <attribute name="name" use="prohibited" />
        <attribute name="value" use="prohibited" />
        <attribute name="values" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="list_entry">
        <annotation>
            <documentation><![CDATA[
                Used in <combo/> and <multiselect/>. More information see short_descriptions below. The attributes are value, display_value, short_description, icon, icon_size, regions, and exclude_regions.
            ]]></documentation>
        </annotation>
        <attribute name="value" type="string" use="required" />
        <attribute name="value_context" type="string" />
        <attribute name="display_value" type="string" />
        <attribute name="short_description" type="string">
            <annotation>
                <documentation><![CDATA[
                    A delimiter-separated list of texts to be displayed below each display_value. (Only if it is not possible to describe the entry in 2-3 words.) Instead of a comma separated list using values, display_values and short_descriptions, the following form is also supported: <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
                ]]></documentation>
            </annotation>
        </attribute>
        <attributeGroup ref="tns:attributes.icon" />
        <attributeGroup ref="tns:attributes.regions"/>
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="combo">
        <annotation>
            <documentation>
                <p>
                    Displays a multiple choice combo box. key and values are mandatory, text, default, editable, delimiter, values_from, display_values, short_descriptions, use_last_as_default, values_searchable, length, values_no_i18n, values_sort, match, regions, and exclude_regions are optional.
                </p>
                <p>
                    If editable is "true" (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable combo boxes can only contain one of the specified values.
                </p>
                <p>
                    If the key is colour or colour:* or *:colour, a color preview and color picker is added on the right (see #8352).
                </p>
            </documentation>
        </annotation>
        <!-- use either list_entry's or a combination of values/display_values -->
        <sequence>
            <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <attributeGroup ref="tns:attributes.key" />
        <attributeGroup ref="tns:attributes.text" />
        <attributeGroup ref="tns:attributes.icon" />
        <attributeGroup ref="tns:attributes.values" />
        <attribute name="use_last_as_default" type="tns:last_default" />
        <attribute name="editable" type="boolean">
            <annotation>
                <documentation>
                    The combo box is read only, which means that the user can only select an item in the list. Default is "true", which means, the user can add other values as text.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="match" type="tns:match" />
        <attributeGroup ref="tns:attributes.length" />
        <attributeGroup ref="tns:attributes.regions"/>

        <attribute name="type" use="prohibited" />
        <attribute name="value" use="prohibited" />
        <attribute name="name" use="prohibited" />
        <attribute name="delete-if-empty" use="prohibited" />
        <attribute name="display-values" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="multiselect">
        <!-- use either list_entry's or a combination of values/display_values -->
        <sequence>
            <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <attributeGroup ref="tns:attributes.key" />
        <attributeGroup ref="tns:attributes.text" />
        <attributeGroup ref="tns:attributes.icon" />
        <attributeGroup ref="tns:attributes.values" />
        <attributeGroup ref="tns:attributes.regions"/>
        <attribute name="use_last_as_default" type="tns:last_default" />
        <attribute name="match" type="tns:match" />

        <attribute name="type" use="prohibited" />
        <attribute name="value" use="prohibited" />
        <attribute name="name" use="prohibited" />
        <attribute name="delete-if-empty" use="prohibited" />
        <attribute name="display-values" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="checkgroup">
        <annotation>
            <documentation>
                To group checks. The columns attribute is required.
            </documentation>
        </annotation>
        <sequence>
            <choice minOccurs="1" maxOccurs="unbounded">
                <element name="check" type="tns:check" />
            </choice>
        </sequence>
        <attribute name="columns" type="positiveInteger">
            <annotation>
                <documentation><![CDATA[
                    the number of columns of grouped <check />
                ]]></documentation>
            </annotation>
        </attribute>
        <anyAttribute processContents="skip" />
    </complexType>

    <complexType name="check">
        <attributeGroup ref="tns:attributes.key" />
        <attributeGroup ref="tns:attributes.text" />
        <attribute name="value_on" type="string">
            <annotation>
                <documentation><![CDATA[
                    Specify the true value to be entered in the <key /> tag of a checked <check /> (default is "yes").
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="value_off" type="string">
            <annotation>
                <documentation><![CDATA[
                    Specify the false value to be entered in the <key /> tag of a checked <check /> (default is "no").
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="disable_off" type="boolean">
            <annotation>
                <documentation><![CDATA[
                    Whether the off value of a <check /> is disabled in the dialog, i.e., only unset or "yes" are provided.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="match" type="tns:match" />
        <attributeGroup ref="tns:attributes.icon" />
        <attributeGroup ref="tns:attributes.regions"/>

        <attribute name="name" use="prohibited" />
        <attribute name="type" use="prohibited" />
        <attribute name="value" use="prohibited" />
        <anyAttribute processContents="skip" />
    </complexType>

    <simpleType name="check_default">
        <restriction base="string">
            <enumeration value="on" />
            <enumeration value="off" />
        </restriction>
    </simpleType>

    <simpleType name="last_default">
        <annotation>
            <documentation><![CDATA[
                For <combo />, <multiselect /> or <text /> fields the last used value is used as default. Using "force" enforces this behavior also for already tagged objects. Default is "false".
            ]]></documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="true" />
            <enumeration value="false" />
            <enumeration value="force" />
        </restriction>
    </simpleType>

    <simpleType name="match">
        <annotation>
            <documentation>
                <p>
                    Allows to change the matching process, i.e., determining whether the tags of an OSM object fit into this preset. If a preset fits then it is linked in the Tags/Membership dialog.
                </p>

                <ul>
                    <li>none: neutral, i.e., do not consider this item for matching</li>
                    <li>key!: positive if key matches, negative otherwise</li>
                    <li>keyvalue: positive if key and value matches, neutral otherwise</li>
                    <li>keyvalue!: positive if key and value matches, negative otherwise</li>
                </ul>

                <p><![CDATA[
                    Note: For a match, at least one positive and no negative is required. Default is "keyvalue!" for <key> and "none" for <text />, <combo />, <multiselect /> and <check />.
                ]]></p>
            </documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="none" />
            <enumeration value="key" />
            <enumeration value="key!" />
            <enumeration value="keyvalue" />
            <enumeration value="keyvalue!" />
        </restriction>
    </simpleType>

    <complexType name="roles">
        <group ref="tns:roles_elements" maxOccurs="unbounded" />
    </complexType>

    <group name="roles_elements">
        <choice>
            <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
            <element name="reference" type="tns:reference" />
        </choice>
    </group>

    <complexType name="role">
        <annotation>
            <documentation>
                To specify possible roles of members in relations. The key attribute is required, text, requisite, count, type, member_expression, regions, and exclude_regions are optional.
            </documentation>
        </annotation>
        <attribute name="key" type="string">
            <annotation>
                <documentation>
                    The role name used in a relation.
                </documentation>
            </annotation>
        </attribute>
        <attributeGroup ref="tns:attributes.text" />
        <attribute name="requisite" type="tns:role_requisite" />
        <attribute name="type" type="string" />
        <attribute name="count" type="integer" />
        <attribute name="member_expression" type="string" />
        <attribute name="regexp" type="boolean" />
        <attributeGroup ref="tns:attributes.regions"/>
        <anyAttribute processContents="skip" />
    </complexType>

    <simpleType name="role_requisite">
        <annotation>
            <documentation>
                If a relation member is optional or required. Default is "optional".
            </documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="required" />
            <enumeration value="optional" />
        </restriction>
    </simpleType>

    <!-- Types and documentation for attributes -->

    <attributeGroup name="attributes.name">
        <attribute name="name" type="string" use="required">
            <annotation>
                <documentation>
                    Specify a name for an item. This name will be used in the GUI to display the tagging preset.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="name_context" type="string">
            <annotation>
                <documentation>
                    Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
                </documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.key">
        <attribute name="key" type="string" use="required">
            <annotation>
                <documentation>
                    This specifies the property key that will be modified by the item.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="default" type="string">
            <annotation>
                <documentation><![CDATA[
                    An explicitly declared default value for the item. This value is only applied through a preset when the object the preset is applied to has zero keys. If no value for default is specified, no value is set to the key. Used in >check /<, >text /<, >combo /< and >multiselect /<.
                ]]></documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.text">
        <attribute name="text" type="string">
            <annotation>
                <documentation><![CDATA[
                    The description, that will be displayed before (after in case of <check />) the gui element. Also used for <label> and <optional>.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="text_context" type="string">
            <annotation>
                <documentation>
                    Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
                </documentation>
            </annotation>
        </attribute>
        <attribute name="multiline" type="boolean">
            <annotation>
                <documentation>
                    The text is expected to be multiline, and newlines must not be normalized (default is false)
                </documentation>
            </annotation>
        </attribute>
        <attribute name="normalize" type="boolean">
            <annotation>
                <documentation>
                    This performs normalization of the value by stripping extraneous spaces and consolidating whitespace (default is true for JOSM)
                </documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.values">
        <attribute name="values" type="string">
            <annotation>
                <documentation>
                    A list of entries. The list has to be separated by commas (for the combo box) or by the specified delimiter (for the multiselect). If a value contains the delimiter, the delimiter may be escaped with a backslash. If a value contains a backslash, it must also be escaped with a backslash.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="values_from" type="string">
            <annotation>
                <documentation>
                    To use instead of values if the list of values has to be obtained with a Java method of this form: public static String[] getValues(); The value must be: "full.package.name.ClassName#methodName".
                </documentation>
            </annotation>
        </attribute>
        <attribute name="values_context" type="string">
            <annotation>
                <documentation>
                    Translation context for values attribute to separate equals words with different meaning (not required for in-file translations).
                </documentation>
            </annotation>
        </attribute>
        <attribute name="values_no_i18n" type="boolean">
            <annotation>
                <documentation>
                    Disables internationalisation for value to avoid mistakes, see #11696. Default is "false". (Useful e.g. for opening hours or brand names.)
                </documentation>
            </annotation>
        </attribute>
        <attribute name="values_sort" type="boolean">
            <annotation>
                <documentation>
                    Values of are sorted alphabetic in every language. With this attribute you can disable the alphabetic sorting if the values should keep the given order, see #5509 and #11926. (In the JOSM internal preset this is used e.g. for the keys tracktype, direction, network, smoothness, visibility or trail_visibility.) Default is "true".<br />
                    Users can globally disable sorting with the preference key taggingpreset.sortvalues.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="display_values" type="string">
            <annotation>
                <documentation>
                    A list of entries that is displayed to the user. Must be the same number and order of entries as values and editable must be "false" or not specified. For the delimiter character and escaping, see the remarks at values.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="values_searchable" type="boolean">
            <annotation>
                <documentation>
                    Whether to search in (display_)values when searching for presets.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="delimiter" type="string">
            <annotation>
                <documentation><![CDATA[
                    The character that separates values. In case of <combo /> the default is comma. In case of <multiselect /> the default is semicolon and this will also be used to separate selected values in the tag.
                ]]></documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.icon">
        <attribute name="icon" type="string">
            <annotation>
                <documentation><![CDATA[
                    A name or link to an icon. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. Icons can also be used in <item>, <label /> and <list_entry />. The icon should be quadratic in size. See Icon handling how icons can be specified.
                ]]></documentation>
            </annotation>
        </attribute>
        <attribute name="icon_size" type="integer">
            <annotation>
                <documentation><![CDATA[
                    The maximal size of an icon in px. If no value is given, default is 16 for <label /> and the default icon size for <list_entry /> (in <combo> and <multiselect>).
                ]]></documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.length">
        <attribute name="length" type="positiveInteger">
            <annotation>
                <documentation><![CDATA[
                    The length of a <text /> or <combo /> box (number of characters allowed).
                ]]></documentation>
            </annotation>
        </attribute>
    </attributeGroup>

    <attributeGroup name="attributes.regions">
        <attribute name="regions" type="string">
            <annotation>
                <documentation>
                    Comma separated list of countries this preset group or item is applicable for. If not specified, the preset is applicable for all countries.
                </documentation>
            </annotation>
        </attribute>
        <attribute name="exclude_regions" type="boolean">
            <annotation>
                <documentation>
                    If true, invert the meaning of regions.
                </documentation>
            </annotation>
        </attribute>
    </attributeGroup>

</schema>
