﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://josm.openstreetmap.de/tagging-preset-1.0" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="http://josm.openstreetmap.de/tagging-preset-1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!-- See http://josm.openstreetmap.de/wiki/TaggingPresets for more information. -->

  <!--
Translation and localisation

The fields "name", "text", "display_values" may also be localized (e.g. de.name).
When translations of equal words but different meanings may conflict, a translation
context should be specified. Use "name_context", "text_context" or "values_context"
for this. The context should be a meaningful short description to help translators.

In JOSM internally all "name", "text" and "display_values" are translated when
no specific translation has been given in XML file. When no "display_values"
are supplied, then "values" will be treated as "display_values" and translated instead.
-->

  <!--
Key/value/item matching

The match attribute allows to change the matching process, i.e., determining whether
the tags of an OSM object fit into this preset.
 - none: neutral, i.e., do not consider this item for matching
 - key: positive if key matches, neutral otherwise
 - key!: positive if key matches, negative otherwise
 - keyvalue: positive if key and value matches, negative otherwise
Note that for a match, at least one positive and no negative is required.
-->

  <!--
optional: optional tags, short for "space" plus "label" plus "space"
  -->
  <!--
separator: separator line in menus
  -->
  <!--
item_separator: horizontal separator line between items (in window)
  -->
  <!--
role: type to specify possible roles in relations
  key: the role name used in relation
  text: fixed label to display
  requisite: optional/required (default is "optional")
  count: how often can the role occur (if not given unlimited number is assumed)
  type: the data types - way,node,relation,closedway (separated by comma)
  member_expression: an expression (cf. search dialog) for objects of this role
  -->

  <xs:element name="presets">
    <!--
 presets: For external files <presets> should have following attributes:
 The fields description, shortdescription and link may also be localized (e.g. de.link)
  -->
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="group" type="group" />
      </xs:sequence>
      <xs:attribute name="author" type="xs:string" use="optional" default="">
        <xs:annotation>
          <xs:documentation>The author of the preset.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="version" type="xs:string" use="optional" default="">
        <xs:annotation>
          <xs:documentation>A version number of some sort (e.g. creation date).</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="description" type="xs:string" use="optional" default="">
        <xs:annotation>
          <xs:documentation>What is your preset meant to be?</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="shortdescription" type="xs:string" use="optional" default="">
        <xs:annotation>
          <xs:documentation>Very short description.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="link" type="xs:anyURI" use="optional" default="">
        <xs:annotation>
          <xs:documentation>A link to a helpful website (optional).</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="group">
    <xs:annotation>
      <xs:documentation>A group of items.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="group" type="group" />
        <xs:element name="separator" />
        <xs:element name="item" type="item" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="name_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the name value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="icon" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          The icon to display.
          - Relative to the preset path.
          - URL's are also supported to allow remote icons (are cached locally).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="item">
    <!--
  name_template: define custom formatting for OSM primitives
                 see http://josm.openstreetmap.de/wiki/NameTemplate
  -->
    <xs:annotation>
      <xs:documentation>A preset item.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="check" type="valueCheck" />
        <xs:element name="checkgroup" type="valueCheckGroup" />
        <xs:element name="combo" type="valueCombo" />
        <xs:element name="label" type="valueLabel" />
        <xs:element name="link" type="valueLink" />
        <xs:element name="key" type="valueKey" />
        <xs:element name="multiselect" type="valueMultiselect" />
        <xs:element name="space" type="valueSpace" />
        <xs:element name="text" type="valueText" />
        <xs:element name="roles">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="role">
                <xs:complexType>
                  <xs:attribute name="key" type="xs:string" use="required" />
                  <xs:attribute name="text" type="xs:string" use="required" />
                  <xs:attribute name="requisite" type="xs:string" use="required" />
                  <xs:attribute name="type" type="xs:string" use="required" />
                  <xs:attribute name="count" type="xs:unsignedByte" use="optional" />
                  <xs:attribute name="member_expression" type="xs:string" use="optional" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="optional">
          <xs:complexType>
            <xs:sequence>
              <xs:choice maxOccurs="unbounded">
                <xs:element name="check" type="valueCheck" />
                <xs:element name="checkgroup" type="valueCheckGroup" />
                <xs:element name="combo" type="valueCombo" />
                <xs:element name="label" type="valueLabel" />
                <xs:element name="multiselect" type="valueMultiselect" />
                <xs:element name="space" type="valueSpace">
                </xs:element>
                <xs:element name="text" type="valueText" />
              </xs:choice>
            </xs:sequence>
            <xs:attribute name="text" type="xs:string" use="optional" default="Optional Attributes:">
              <xs:annotation>
                <xs:documentation>The label text to display (defaults to "Optional Attributes:").</xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="text_context" type="xs:string" use="optional">
              <xs:annotation>
                <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
              </xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="name_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the name value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="icon" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          The icon to display.
          - Relative to the preset path.
          - URL's are also supported to allow remote icons (are cached locally).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="type" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          The data types this item can be applied to.
          way,node,relation,closedway (separated by commas).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>

    <xs:attribute name="de.name" type="xs:string" use="optional" />
  </xs:complexType>

  <xs:complexType name="valueCheck">
    <xs:annotation>
      <xs:documentation>A Checkbox (boolean) value.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="key" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The key to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="default" use="optional" default="off">
      <xs:annotation>
        <xs:documentation>Default checked state, on/off.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="on"/>
          <xs:enumeration value="off"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="value_on" type="xs:string" use="optional" default="yes">
      <xs:annotation>
        <xs:documentation>The value to set when checked (default is "yes").</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="value_off" type="xs:string" use="optional" default="no">
      <xs:annotation>
        <xs:documentation>The value to set when unchecked (default is "no").</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="match" use="optional" default="none">
      <xs:annotation>
        <xs:documentation>
          The key/value matching scheme, none,key,key!,keyvalue.
          See notes at the top for more information.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none"/>
          <xs:enumeration value="key"/>
          <xs:enumeration value="key!"/>
          <xs:enumeration value="keyvalue"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueCheckGroup">
    <xs:annotation>
      <xs:documentation>A group of check values.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="check" type="valueCheck" />
    </xs:sequence>
    <xs:attribute name="columns" type="xs:unsignedByte" use="required">
      <xs:annotation>
        <xs:documentation>The number of columns.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueCombo">
    <xs:annotation>
      <xs:documentation>A combo box, with multiple choices and possible to enter free form text.</xs:documentation>
    </xs:annotation>
    <!--
  short_descriptions: comma 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 comma separated list
  instead using values, display_values and short_descriptions, the following form is also supported:
    <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
        icon: location of icon
        icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
  editable: allow to add other values as text (default is "true")
  -->
    <xs:sequence minOccurs="0">
      <xs:element maxOccurs="unbounded" name="list_entry">
        <xs:complexType>
          <xs:attribute name="value" type="xs:string" use="required" />
          <xs:attribute name="icon" type="xs:string" use="optional" />
          <xs:attribute name="short_description" type="xs:string" use="optional" />
          <xs:attribute name="display_value" type="xs:string" use="optional" />
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="key" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The key to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="delimiter" type="xs:string" use="optional" default=",">
      <xs:annotation>
        <xs:documentation>
          Delimiter character that separates values (default: comma).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>delimiter separated list of values.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values_from" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          To use instead of "values" if the list of values has to be obtained with a Java method.
          The method must be of the form: public static String[] getValues();
          The value must be: "full.package.name.ClassName#methodName".
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="display_values" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          delimiter separated list of display values instead of the raw values.
          Order and number must be equal to values.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the display_values value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="default" type="xs:string" use="optional" default="">
      <xs:annotation>
        <xs:documentation>Default string to display (defaults to "").</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="use_last_as_default" use="optional" default="false">
      <xs:annotation>
        <xs:documentation>Whether to use the last entered value as the default (default is "false").</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true"/>
          <xs:enumeration value="false"/>
          <xs:enumeration value="force"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="length" type="xs:unsignedByte" use="optional">
      <xs:annotation>
        <xs:documentation>The maximum length of entered value.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="match" use="optional" default="none">
      <xs:annotation>
        <xs:documentation>
          The key/value matching scheme, none,key,key!,keyvalue.
          See notes at the top for more information.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none"/>
          <xs:enumeration value="key"/>
          <xs:enumeration value="key!"/>
          <xs:enumeration value="keyvalue"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueLabel">
    <xs:annotation>
      <xs:documentation>A simple static text label.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueLink">
    <xs:annotation>
      <xs:documentation>
        A link to the relating map features website.
        The label text is fixed at "More information about this feature".
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="href" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The URL.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="ar.href" type="xs:string" use="optional" />
    <xs:attribute name="az.href" type="xs:string" use="optional" />
    <xs:attribute name="bg.href" type="xs:string" use="optional" />
    <xs:attribute name="cs.href" type="xs:string" use="optional" />
    <xs:attribute name="da.href" type="xs:string" use="optional" />
    <xs:attribute name="de.href" type="xs:string" use="optional" />
    <xs:attribute name="es.href" type="xs:string" use="optional" />
    <xs:attribute name="et.href" type="xs:string" use="optional" />
    <xs:attribute name="fi.href" type="xs:string" use="optional" />
    <xs:attribute name="fr.href" type="xs:string" use="optional" />
    <xs:attribute name="hr.href" type="xs:string" use="optional" />
    <xs:attribute name="hu.href" type="xs:string" use="optional" />
    <xs:attribute name="it.href" type="xs:string" use="optional" />
    <xs:attribute name="ja.href" type="xs:string" use="optional" />
    <xs:attribute name="ko.href" type="xs:string" use="optional" />
    <xs:attribute name="no.href" type="xs:string" use="optional" />
    <xs:attribute name="nl.href" type="xs:string" use="optional" />
    <xs:attribute name="pl.href" type="xs:string" use="optional" />
    <xs:attribute name="pt.href" type="xs:string" use="optional" />
    <xs:attribute name="pt_BR.href" type="xs:string" use="optional" />
    <xs:attribute name="ro.href" type="xs:string" use="optional" />
    <xs:attribute name="ru.href" type="xs:string" use="optional" />
    <xs:attribute name="sv.href" type="xs:string" use="optional" />
    <xs:attribute name="uk.href" type="xs:string" use="optional" />
    <xs:attribute name="zh_CN.href" type="xs:string" use="optional" />
    <xs:attribute name="zh-hans.href" type="xs:string" use="optional" />
    <xs:attribute name="zh-hant.href" type="xs:string" use="optional" />
  </xs:complexType>

  <xs:complexType name="valueKey">
    <xs:annotation>
      <xs:documentation>A fixed key/value pair to be set.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="key" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The key to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="value" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The value to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="match" use="optional" default="none">
      <xs:annotation>
        <xs:documentation>
          The key/value matching scheme, none,key,key!,keyvalue.
          See notes at the top for more information.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none"/>
          <xs:enumeration value="key"/>
          <xs:enumeration value="key!"/>
          <xs:enumeration value="keyvalue"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueMultiselect">
    <xs:annotation>
      <xs:documentation>A list of values from which zero or more can be selected.</xs:documentation>
    </xs:annotation>
    <!--
  rows: specify the number of rows to display (default -1)
  short_descriptions: 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 separated list
  instead using values, display_values and short_descriptions, the following form is also supported:
    <list_entry value="" display_value="' short_description="" icon="" icon_size="" />
        icon: location of icon
        icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
  -->
    <xs:attribute name="key" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The key to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="delimiter" type="xs:string" use="optional" default=";">
      <xs:annotation>
        <xs:documentation>Delimiter character that separates values (default: semicolon).</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>delimiter separated list of values.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values_from" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          To use instead of "values" if the list of values has to be obtained with a Java method.
          The method must be of the form: public static String[] getValues();
          The value must be: "full.package.name.ClassName#methodName".
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="display_values" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          delimiter separated list of display values instead of the raw values.
          Order and number must be equal to values.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="values_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the display_values value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="default" type="xs:string" use="optional" default="">
      <xs:annotation>
        <xs:documentation>Default string to display (defaults to "").</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="use_last_as_default" use="optional" default="false">
      <xs:annotation>
        <xs:documentation>Whether to use the last entered value as the default (default is "false").</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true"/>
          <xs:enumeration value="false"/>
          <xs:enumeration value="force"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="match" use="optional" default="none">
      <xs:annotation>
        <xs:documentation>
          The key/value matching scheme, none,key,key!,keyvalue.
          See notes at the top for more information.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none"/>
          <xs:enumeration value="key"/>
          <xs:enumeration value="key!"/>
          <xs:enumeration value="keyvalue"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="valueSpace">
    <xs:annotation>
      <xs:documentation>An empty line.</xs:documentation>
    </xs:annotation>
  </xs:complexType>

  <xs:complexType name="valueText">
    <xs:annotation>
      <xs:documentation>A free entry text box.</xs:documentation>
    </xs:annotation>
    <xs:attribute name="key" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The key to set.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The label text to display.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text_context" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>The context of the text value for translation purposes.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="default" type="xs:string" use="optional" default="">
      <xs:annotation>
        <xs:documentation>Default string to display (defaults to "").</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="use_last_as_default" use="optional" default="false">
      <xs:annotation>
        <xs:documentation>Whether to use the last entered value as the default (default is "false").</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true"/>
          <xs:enumeration value="false"/>
          <xs:enumeration value="force"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="auto_increment" type="xs:string" use="optional" default="">
      <xs:annotation>
        <xs:documentation>
          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.
          Default is no auto-increment.
          Mutually exclusive with use_last_as_default.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="length" type="xs:unsignedByte" use="optional">
      <xs:annotation>
        <xs:documentation>The maximum length of entered value.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="match" use="optional" default="none">
      <xs:annotation>
        <xs:documentation>
          The key/value matching scheme, none,key,key!,keyvalue
          See notes at the top for more information.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="none"/>
          <xs:enumeration value="key"/>
          <xs:enumeration value="key!"/>
          <xs:enumeration value="keyvalue"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
</xs:schema>