Changes between Version 13 and Version 14 of De:TaggingPresets


Ignore:
Timestamp:
2014-11-07T17:20:40+01:00 (10 years ago)
Author:
Klumbumbus
Comment:

update to rev 100

Legend:

Unmodified
Added
Removed
Modified
  • De:TaggingPresets

    v13 v14  
    1 [[TranslatedPages(revision=87,outdated=Die Syntax der Objektvorlagen wurde geändert und die Kopie des XML-Dokuments muss mit der Wikidokumentation zusammengeführt werden. Wenn dies geschehen ist müssen die Änderungen hier übernommen werden und schließlich dieser Teil noch übersetzt werden. Außerdem sollte das Beispiel geändert werden weil es für OSM ungewöhnliche Schlüssel-Wert-Kombinationen nutzt und Straßen normalerweise NICHT Einbahnstraßen sind.)]]
     1[[TranslatedPages(revision=100,outdated=Muss teilweise noch übersetzt werden. Außerdem sollte das Beispiel geändert werden weil es für OSM ungewöhnliche Schlüssel-Wert-Kombinationen nutzt und Straßen normalerweise NICHT Einbahnstraßen sind.)]]
    22[[PageOutline(2-10,Inhaltsverzeichnis)]]
    33= Objektvorlagen =
     
    4040}}}
    4141
    42 
    43 == XML Format Beschreibung (nicht aktuell!) ==#XML
     42== XML Format Beschreibung ==#XML
    4443=== Tags ===
    4544==== The document prolog ====
     
    5352   * '''link''' (i18n) - web link to further details (optional)
    5453   * '''icon''' - informational icon for the whole preset. (This is nedded to display the icon in the table at [[Presets]].)
    55 (i18n) means the values may also be localized (e.g. de.link).
     54(i18n) means the values may also be localized (e.g. de.description).
    5655==== Comments ====
    5756 '''<!-- this is an example comment -->'''::
     
    6160   Used to group items in sub menus. ''name'' is required, ''icon'' is optional attribute.
    6261 '''<item>'''::
    63    Every item is one annotation set to select from. ''name'' is required, ''type'' is recommended, ''icon'' is optional attribute.
     62   Every item is one annotation set to select from. ''name'' is required, ''type'' and ''preset_name_label'' are recommended, ''icon'' and ''name_template'' are optional attributes.
    6463 '''<separator/>'''::
    6564   Insert a line separator into the menu.
     
    8887==== Attribute entry and selection dialog boxes ====
    8988 '''<text>'''::
    90    A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'', ''match'' and ''required'' is optional
     89   A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'', ''use_last_as_default'', ''auto_increment'', ''length'', ''alternative_autocomplete_keys'' and ''match'' is optional
    9190 '''<combo>'''::
    92    Displays a multiple choice combo box. ''key'' and ''values'' are mandatory and ''text'', ''default'', ''editable'', ''match'' and ''required'' is optional.
     91   Displays a multiple choice combo box. ''key'' and ''values'' are mandatory, ''text'', ''default'', ''editable'', ''delimiter'', ''values_from'', ''display_values'', ''schort_descriptions'', ''use_last_as_default'', ''values_searchable'', ''length'' and ''match'' is optional.
    9392   If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable
    9493   combo boxes can only contain one of the specified values.
    9594 '''<multiselect>'''::
    96    Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'', ''match'' and ''required'' are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value.
     95   Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'', ''values_from'', ''rows'', ''display_values'', ''short_descriptions'', ''use_last_as_default'', ''values_searchable'' and ''match'' are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value.
     96 '''<list_entry>'''::
     97   Used in <combo> and <multiselect>. More information see ''short_descriptions''. The attributes are ''value'', ''display_value'', ''short_description'', ''icon'' and ''icon_size''.
    9798 '''<check>'''::
    98    A checkbox which the user can only select or deselect. The ''key'' attribute is mandatory. ''text'', ''default'', ''match'' and ''required'' is optional.
     99   A checkbox which the user can only select or deselect (or set as unset). The ''key'' attribute is mandatory. ''text'', ''default'', ''match'', ''value_on'' , ''value_off'' and ''disable_off'' are optional.
    99100==== Templates ====
    100101 '''<chunk>'''::
     
    112113   When specified, only objects of the given type will be changed at all by this tagging preset. Can be "node", "relation", "way", "closedway" or any comma separated combination of them. Also used in the <role> tag to specify which object types are allowed for a specific relation member.
    113114 '''icon="iconname"'''::
    114    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. The icon should be quadratic in size. See [[Styles#Iconhandling]] how icons can be specified.
     115   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 [[Styles#Iconhandling]] how icons can be specified.
    115116 '''icon_size="a number"'''::
    116    The maximal size of an icon in px. If no value is given, default is 16 for <label>.
     117   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>).
    117118 '''key="some_key"'''::
    118119   This specifies the property key that will be modified by the item. In case of <role> it is the role name used in a relation.
     
    122123   Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
    123124 '''default="default_value"'''::
    124    The default value for the item. If not specified, the current value of the key is chosen as default (if applicable).
     125   The default value for the item. If not specified, the current value of the key is chosen as default (if applicable). In case of <check> whether the checkbox is ticked on or off by default (default is "off"). In case of <text>, <combo> and <multiselct> defaults to "".
    125126 '''values="entry1,entry2,entry3"'''::
    126    A list of entries (for the combo box and multiselect). 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.
     127   A list of entries (for the <combo> box and <multiselect>). 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.
     128 '''values_from="JAVA code"'''::
     129   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".
    127130 '''values_context="context"'''::
    128131   Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
    129132 '''display_values="Entry1,Entry2,Entry3"'''::
    130    A list of entries that is displayed to the user. Must be the same number of entries as values and '''editable''' must be false or not specified. For the delimiter character and escaping, see the remarks at ''values''.
     133   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''. Used in <combo> and <multiselect>.
    131134 '''value="foobar"'''::
    132135   Specify a value to be entered in the <key> tag.
    133136 '''value_on="foobar"'''::
    134    Specify the true value to be entered in the <key> tag (default is "yes").
     137   Specify the true value to be entered in the <key> tag of a checked <check> (default is "yes").
    135138 '''value_off="foobar"'''::
    136    Specify the false value to be entered in the <key> tag (default is "no").
     139   Specify the false value to be entered in the <key> tag of a unchecked <check> (default is "no").
     140 '''disable_off="true"'''::
     141   Whether the off value of a <check> is disabled in the dialog, i.e., only unset or yes are provided.
    137142 '''editable="false"'''::
    138    The combo box is readonly, which means that the user can only select an item in the list.
    139  '''use_last_as_default="true"'''::
    140    For combo boxes or text fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects.
     143   The combo box is readonly, 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.
     144 '''use_last_as_default="true|false|force"'''::
     145   For <combo>, <multiselect> or <text> fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects. Default is "false".
    141146 '''rows="count"'''::
    142    Specify the number of rows in multiselect entry.
     147   Specify the number of rows to display in <multiselect> entry (default -1).
    143148 '''name_template="template", name_template_filter="search expression"'''::
    144149   Custom name formatter for osm primitives matching this preset. See [[NameTemplate]] for details.
     
    165170 '''preset_name="exact_name"'''::
    166171   The exact name of the preset to link to.
    167 
    168 == Format description from XML document (needs to be joined with above texts) ==
    169  (delete here the parts which you have joined with above texts)
    170 
    171 {{{
    172 item:
    173   name: the text to display
    174   icon: the icon to display
    175   - relative to the icon path
    176   - URL's are also supported to allow remote icons (are cached locally)
    177   type: the data types - way,node,relation,closedway (separated by comma)
    178   name_template: define custom formatting for OSM primitives
    179                  see [[NameTemplate]]
    180   preset_name_label: whether to insert "[preset name]" label in dialog
    181                      (defaults to "false" for backward-compatibility on external presets)
    182 
    183 text: text box
    184   key: key to set
    185   text: fixed label to display
    186   default: default string to display (defaults to "")
    187   use_last_as_default: true/false/force (default is "false")
    188   auto_increment: may contain a comma separated list of integer increments or
    189                   decrements, e.g. "-2,-1,+1,+2"; a button will be shown next
    190                   to the text field for each value, allowing the user to select
    191                   auto-increment with the given stepping. auto-increment only
    192                   happens if the user selects it. default is no auto-increment;
    193                   mutually exclusive with use_last_as_default.
    194   length: length of input box (number of characters allowed)
    195   alternative_autocomplete_keys: comma separated list of alternative keys to use for autocompletion
    196 
    197 combo: combo box, with multiple choices and possible to enter free form text
    198   key: key to set
    199   text: fixed label to display
    200   delimiter: character that separates values (default: comma)
    201   values: separated list of values
    202   values_from: to use instead of "values" if the list of values has to be obtained with a Java method
    203                of this form: public static String[] getValues();
    204                The value must be: "full.package.name.ClassName#methodName"
    205   display_values: comma separated list of values to be displayed instead of the
    206                   database values, order and number must be equal to values
    207   short_descriptions: comma separated list of texts to be displayed below each
    208                       display_value. (Only if it is not possible to describe
    209                       the entry in 2-3 words.) Instead of comma separated list
    210   instead using values, display_values and short_descriptions, the following form is also supported:
    211     <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
    212         icon: location of icon
    213         icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
    214   default: default string to display (defaults to "")
    215   use_last_as_default: true/false/force (default is "false")
    216   editable: allow to add other values as text (default is "true")
    217   values_searchable: true/false (whether to search in combo (display_)values when searching for presets)
    218   length: length of input box (number of characters allowed)
    219 
    220 multiselect: list of values from which zero or more can be selected
    221   key: key to set
    222   text: fixed label to display
    223   delimiter: character that separates values (default: semicolon) - this
    224              will also be used to separate selected values in the tag.
    225   values: delimiter-separated list of values (delimiter can be escaped with backslash)
    226   values_from: to use instead of "values" if the list of values has to be obtained with a Java method
    227                of this form: public static String[] getValues();
    228                The value must be: "full.package.name.ClassName#methodName"
    229   rows: specify the number of rows to display (default -1)
    230   display_values: delimiter-separated list of values to be displayed instead of the
    231                   database values, order and number must be equal to values
    232   short_descriptions: delimiter-separated list of texts to be displayed below each
    233                       display_value. (Only if it is not possible to describe
    234                       the entry in 2-3 words.) Instead of a separated list
    235   instead using values, display_values and short_descriptions, the following form is also supported:
    236     <list_entry value="" display_value="' short_description="" icon="" icon_size="" />
    237         icon: location of icon
    238         icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
    239   default: default string to display (defaults to "")
    240   use_last_as_default: true/false/force (default is "false")
    241   values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)
    242 
    243 check: checkbox
    244   key: key to set
    245   text: fixed label to display
    246   default: ticked on/off (default is "off")
    247   value_on: the value to set when checked (default is "yes")
    248   value_off: the value to set when unchecked (default is "no")
    249   disable_off: whether the off value is disabled in the dialog, i.e., only unset or yes are provided
    250 
    251 }}}
     172 '''preset_name_label="false|true"'''::
     173   Whether to insert "[preset name]" label in dialog (defaults to "false" for backward-compatibility on external presets).
     174 '''length="a number"'''::
     175   The length of a <text> or <combo> box (number of characters allowed).
     176 '''alternative_autocomplete_keys="some_key(s)"'''::
     177   A comma separated list of alternative keys to use for autocompletion of <text>.
     178 '''auto_increment="-2,-1,+1,+2"'''::
     179   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''.
     180 '''delimiter="special character"'''::
     181   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. More information see <multiselect>.
     182 '''short_descriptions=""Entry1,Entry2,Entry3"'''::
     183   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 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="" />
     184 '''values_searchable="true|false"'''::
     185   Whether to search in <combo> or <multiselect> (display_)values when searching for presets.
    252186
    253187== Translation ==