Changes between Version 123 and Version 180 of TaggingPresets


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v123 v180  
    11[[TranslatedPages]]
    22[[PageOutline(2-10,Table of Contents)]]
     3
     4''If you want to learn installation steps for presets, see [[JOSMImage(dialogs/propertiesdialog)]] [wikitr:/Help/Preferences/TaggingPresetPreference Tagging Presets] register in [[JOSMImage(preference)]] [wikitr:/Help/Action/Preferences Preferences]'' \\
     5''If you want to use presets or need complete reference of presets see [wikitr:/Presets Presets]''
     6
     7----
     8
    39= Tagging Presets =
    4 JOSM supports distributed tagging presets. This is a XML config file that describes a GUI for entering tags (or properties, annotations, sometimes called map features). The XML files can be placed anywhere in the web or at the users local file system. Presets can be added by the users at a central page [wiki:Presets].
    5 
    6 == Installing presets ==
    7 Either:
    8 * Click on main menu [Help/Menu/Presets Presets] and click on "Preset Preferences".
    9 * Open the [Help/Action/Preferences preferences window], click [[Image(source:trunk/images/preferences/map.png,20)]] map settings and select third tab [Help/Preferences/Map#TaggingPresets "Tagging Presets"].
     10JOSM supports distributed tagging presets. This is a XML config file that describes a GUI for entering tags (or properties, annotations, sometimes called map features).
     11
     12The presets can be placed anywhere in the web or at the users local file system. JOSM can be configured to use custom local or remote Presets.
    1013
    1114== Develop a new preset ==
    1215The tagging preset description is in a very simple XML format. Details see [#XML below].
    1316
    14 See the **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** for an example covering most of the possibilities listed below.
    15 
    16 The full XSD schema is available at the namespace URI (http://josm.openstreetmap.de/tagging-preset-1.0) as well as [source:trunk/data/tagging-preset.xsd the source repository].
    17 
    18 To add the preset to the list of available presets see [[Presets#Createnewpresets]].
     17See the **[source:/trunk/resources/data/defaultpresets.xml defaultpresets.xml]** for an example covering most of the possibilities listed below.
    1918
    2019Example:
    21 [[Image(Change 1 object.png,align=right)]]
     20
     21[[Image(Change 1 object.png,right,link=,margin-left=15)]]
    2222
    2323{{{
    24 #!xml
     24#!preset
     25<?xml version="1.0" encoding="UTF-8"?>
    2526<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
    2627  <item name="Oneway highway" type="way">
     
    3940</presets>
    4041}}}
    41 
    42 The tool [http://visualtags.hotosm.org/ HOT Visual Tag Chooser] allows the user to create or edit a Tagging Preset File using a web interface.
     42\\
    4343
    4444== XML Format description ==#XML
     45The full XSD schema is available at the namespace URI (https://josm.openstreetmap.de/tagging-preset-1.0) as well as [source:/trunk/resources/data/tagging-preset.xsd the source repository].
     46
    4547=== Tags ===
    46 ==== The document prolog ====
     48==== The document prologue ====
    4749 <presets>::
    4850  Has to be the main tag of the file. Supports following attributes
    4951  * '''xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"'''
    5052  * '''author''' - the name of the author of the preset
    51   * '''version''' - the version number of the file. For automatical version adjustment of presets managed in this wiki you can use two internal variables: `[[revision]]` (the latest version number of the wiki page) and `[[date]]` (the date of the last edit).
     53  * '''version''' - 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]]"`.
    5254  * '''description''' (i18n) - description what the file contains
    5355  * '''shortdescription''' (i18n) - very short overview description i.e. the "name" of the preset
    5456  * '''link''' (i18n) - web link to further details (optional)
    55   * '''icon''' - informational icon for the whole preset. (This is nedded to display the icon in the table at [[Presets]].)
    56   * '''baselanguage''' - when the base language is not English, specify it here (using non English preset texts prevents automatic translation)
    57 
    58   (i18n) means the values may also be localized (e.g. de.description).
    59 [[BR]]
     57  * '''icon''' - icon for the whole preset
     58  * '''baselanguage''' - when the base language is not English, specify it here (using non English preset texts will prevent automatic translation, once it is implemented (#11392))
     59
     60 (i18n) means the values may also be localized (e.g. `de.description`).
     61\\
     62
    6063==== Comments ====
    6164 <!-- this is an example comment -->::
    6265  The document can contain embedded comments.
    63 [[BR]]
    64 ==== Menu creation ====
     66\\
     67
     68==== Preset group creation ====
    6569 <group>::
    6670  Used to group items in sub menus. `name` is required, `icon` is optional attribute.
    6771 <item>::
    6872  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.
    69  <separator/>::
     73 <separator />::
    7074  Insert a line separator into the menu.
    71 [[BR]]
     75\\
     76
    7277==== Preset window layout ====
    73  <label>::
     78 <label />::
    7479  Labels are static texts for display. `text` is a required attribute, `icon` and `icon_size` are optional.
    7580 <space />::
    76   Add some space (ie a newline).
     81  Add some space (i.e. a newline).
    7782 <optional>::
    78   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 />
     83  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 />`
    7984 <item_separator />::
    8085  Add a horizontal separator line between items.
    81  <link>::
    82   Specify a web link for this feature or to anything else of use. The `href` attribute is required.
     86 <link />::
     87  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.
    8388 <checkgroup>::
    8489  To group checks. The `columns` attribute is required.
    8590 <roles>::
    86   This is required around <role> and adds the heading ("Availible roles role count elements") to the table which is generated by several <role>.
    87  <role>::
     91  This is required around `<role />` and adds the heading ("Available roles role count elements") to the table which is generated by several `<role />`.
     92 <role />::
    8893  To specify possible roles of members in relations. The `key` attribute is required, `text`, `requisite`, `count`, `type` and `member_expression` are optional.
    89  <preset_link>::
    90   Adds a link to an other preset. The `preset_name` attribute is required.
    91 [[BR]]
     94 <preset_link />::
     95  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. \\
     96  **Watch out** for presets with identical **`name`** as it is not predictable to which preset the link will lead to, see #12716. \\
     97  Having the same tag in both presets does not work, see #18992. \\
     98  Using `<preset_link />` in presets opened from [wikitr:/Help/Dialog/RelationEditor relation editor] produces unexpected changes, see #19392.
     99\\
     100
    92101==== Set a fixed key value pair ====
    93  <key>::
    94   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 ommited, the key is removed. The `match` attribute is optional.
    95 [[BR]]
    96 ==== Attribute entry and selection dialog boxes ====
    97  <text>::
    98   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
    99  <combo>::
    100   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` and `match` is optional.\\
    101   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.
    102  <multiselect>::
    103   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`, `values_no_i18n`, `values_sort` 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.
    104  <list_entry>::
    105   Used in <combo> and <multiselect>. More information see `short_descriptions`. The attributes are `value`, `display_value`, `short_description`, `icon` and `icon_size`.
    106  <check>::
    107   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.
    108 [[BR]]
     102 <key />::
     103  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.
     104\\
     105
     106==== Attribute entry and selection dialog boxes ====#EntrySelectionBoxes
     107 <text />::
     108  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`, `match`, `icon` and `icon_size` (both since r17605) are optional.
     109 <combo />::
     110  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`, `icon` and `icon_size` (both since r17605) are optional.\\
     111  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.\\
     112  If the key is `colour` or `colour:*` or `*:colour`, a color preview and color picker is added on the right (see #8352).
     113 [=#multiselect]
     114 <multiselect />::
     115  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`, `values_no_i18n`, `values_sort`, `match`, `icon` and `icon_size` (both since r17605) 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.
     116 <list_entry />::
     117  Used in `<combo>` and `<multiselect>`. More information see `short_descriptions` [#short_description below]. The attributes are `value`, `display_value`, `short_description`, `icon` and `icon_size`.
     118 <check />::
     119  A checkbox which the user can select, deselect or set as unset. The `key` attribute is mandatory. `text`, `default`, `match`, `value_on` , `value_off`, `disable_off`, `icon` and `icon_size` (both since r15437) are optional.
     120\\
     121
    109122==== Templates ====
    110123 <chunk>::
     
    112125 <reference>::
    113126  To include an earlier defined template. The `ref` attribute is mandatory.
    114 [[BR]]
     127\\
     128
    115129=== Attributes ===
    116130The attributes of the tags have the following meaning:
     
    120134  Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
    121135 type="data_type"::
    122   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.
     136  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.
    123137 icon="iconname"::
    124   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.
     138  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 />`, plus all [#EntrySelectionBoxes attribute entry and selection dialog boxes] (since r17605, before it was only `<list_entry />` and `<check />`).  It is placed in front of `<text />` The icon should be quadratic in size. See [wikitr:/Styles#Iconhandling Icon handling] how icons can be specified.
    125139 icon_size="a number"::
    126   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>).
     140  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>`).
    127141 key="some_key"::
    128   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.
     142  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.
    129143 text="Any text"::
    130   The description, that will be displayed before (after in case of <check>) the gui element. Also used for <label> and <optional>.
     144  The description, that will be displayed before the gui element, (in case of `<check />` after the gui element and the optional icon). Also used for `<label>` and `<optional>`.
    131145 text_context="context"::
    132146  Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
    133147 default="default_value"::
    134   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 "".
     148  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''.
     149  If no value for default is specified, no value is set to the key. Used in `<check />`, `<text />`, `<combo />` and `<multiselect />`. For `<check />` only the values `"on"` and `"off"` are valid.
    135150 values="entry1,entry2,entry3"::
    136   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.
     151  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.
    137152 values_from="JAVA code"::
    138   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".
     153  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".
    139154 values_no_i18n="true|false"::
    140   Disables internationalisation for value to avoid mistakes, see #11696. Default is "false". Used in <combo> and <multiselect>. (Useful e.g. for opening hours or brand names.)
     155  Disables internationalisation for value to avoid mistakes, see #11696. Default is `"false"`. Used in `<combo />` and `<multiselect />`. (Useful e.g. for opening hours or brand names.)
    141156 values_sort="false"::
    142   Values of <combo> and <multiselect> 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 for the keys "smoothness" and "trail_visibility".) Default is "true". Users can globaly disable sorting with the preference key `taggingpreset.sortvalues`.
     157  Values of `<combo />` and `<multiselect />` 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"`.\\
     158 Users can globally disable sorting with the preference key `taggingpreset.sortvalues`.
    143159 values_context="context"::
    144   Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
     160  Translation context for values attribute to separate equals words with different meaning (not required for in-file translations).
    145161 display_values="Entry1,Entry2,Entry3"::
    146   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>.
     162  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 />`.
    147163 value="foobar"::
    148   Specify a value to be entered in the <key> tag.
     164  Specify a value to be entered in the `<key>` tag.
    149165 value_on="foobar"::
    150   Specify the true value to be entered in the <key> tag of a checked <check> (default is "yes").
     166  Specify the true value to be entered in the `<key>` tag of a checked `<check />` (default is `"yes"`).
    151167 value_off="foobar"::
    152   Specify the false value to be entered in the <key> tag of a unchecked <check> (default is "no").
     168  Specify the false value to be entered in the `<key>` tag of a unchecked `<check />` (default is `"no"`).
    153169 disable_off="true"::
    154   Whether the off value of a <check> is disabled in the dialog, i.e., only unset or yes are provided.
     170  Whether the off value of a `<check />` is disabled in the dialog, i.e., only unset or `"yes"` are provided.
    155171 editable="false"::
    156   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.
     172  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. **Feature is broken see #6157**.
    157173 use_last_as_default="true|false|force"::
    158   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".
     174  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"`.
    159175 rows="count"::
    160   Specify the number of rows to display in <multiselect> entry (if not set, it is auto determined by java or the look and feel and results in e.g. 8).
     176  Specify the number of rows to display in `<multiselect />` entry (if not set, it is auto determined by java or the look and feel and results in e.g. 8). Currently, you need to add one additional row to display all values, see #19013.
    161177 name_template="template", name_template_filter="search expression"::
    162   Custom name formatter for osm primitives matching this preset. See [[NameTemplate]] for details.
     178  Custom name formatter for osm primitives matching this preset. See below [[#name_templatedetails]] for details.
    163179 match="none|key|key!|keyvalue|keyvalue!"::
    164   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 [wiki:Help/Dialog/TagsMembership Tags/Membership dialog].
    165   * none: neutral, i.e., do not consider this item for matching
    166   * key: positive if key matches, neutral otherwise
    167   * key!: positive if key matches, negative otherwise
    168   * keyvalue: positive if key and value matches, neutral otherwise
    169   * keyvalue!: positive if key and value matches, negative otherwise
    170 
    171   Note that 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>.
     180  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 [wikitr:/Help/Dialog/TagsMembership Tags/Membership dialog].
     181  * `none`: neutral, i.e., do not consider this item for matching
     182  * `key`: positive if key matches, neutral otherwise
     183  * `key!`: positive if key matches, negative otherwise
     184  * `keyvalue`: positive if key and value matches, neutral otherwise
     185  * `keyvalue!`: positive if key and value matches, negative otherwise \\
     186 **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 />`.
     187 match_expression=""::
     188  Additional criteria for matching primitives. Specified in [wikitr:/Help/Action/Search JOSM search] syntax. ''(since r17662)'' \\
     189  For instance, a preset with `match_expression="foo=bar"` requires OSM objects to have the tag `foo=bar`. You may want to use the `match_expression=""` to exclude certain OSM objects, e.g. when a more specific preset is present.
    172190 id="unique_identifier"::
    173   the unique identifier for this chunk
     191  the unique identifier for this `<chunk>`
    174192 ref="unique_identifier"::
    175193  the unique identifier of the (already defined) template to include
    176194 columns="a number"::
    177   the number of columns of grouped checks
     195  the number of columns of grouped `<check />`
    178196 requisite="optional|required"::
    179   If a relation member is optional or required. Default is "optional".
     197  If a relation member is optional or required. Default is `"optional"`.
    180198 count="a number"::
    181199  How often can a role occur (if not given unlimited number is assumed)
    182200 member_expression="an expression"::
    183201  an expression (cf. search dialog) for objects of this role
     202 regexp="true"::
     203  set to `"true"` if the key of a role is a regular expression. This allows variable roles e.g. `<role key="level_-?\d+" text="Building level" regexp="true" requisite="optional" type="relation" />` allows the roles `level_0`, `level_1`,...
    184204 preset_name="exact_name"::
    185205  The exact name of the preset to link to.
    186206 preset_name_label="false|true"::
    187   Whether to insert "[preset name]" label in dialog (defaults to "false" for backward-compatibility on external presets).
     207  Whether to insert "[preset name]" label in dialog (defaults to `"false"` for backward-compatibility on external presets).
    188208 length="a number"::
    189   The length of a <text> or <combo> box (number of characters allowed).
     209  The length of a `<text />` or `<combo />` box (number of characters allowed).
    190210 alternative_autocomplete_keys="some_key(s)"::
    191   A comma separated list of alternative keys to use for autocompletion of <text>.
     211  A comma separated list of alternative keys to use for auto completion of `<text>`.
    192212 auto_increment="-2,-1,+1,+2"::
    193   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`.
     213  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`.
    194214 delimiter="special character"::
    195   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>.
    196  short_descriptions=""Entry1,Entry2,Entry3"::
    197   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="" />
     215  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 />` [#multiselect above].
     216 [=#short_description]
     217 short_descriptions="Entry1,Entry2,Entry3"::
     218  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="" />`
    198219 values_searchable="true|false"::
    199   Whether to search in <combo> or <multiselect> (display_)values when searching for presets.
     220  Whether to search in `<combo />` or `<multiselect />` `(display_)values` when searching for presets.
     221 value_template="..."::
     222  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.
     223\\
     224
     225===== name_template details =====
     226Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or the Selection).
     227
     228{{{
     229#!xml
     230<?xml version="1.0" encoding="UTF-8"?>
     231<presets>
     232        <item name="Public transportation" type="relation"
     233                name_template="Bus({operator} {ref} ?{'{from} - {via} - {to}' | '{from} - {to}' | '{from}' | '{to}'})"
     234                name_template_filter="type=route route=bus">
     235        </item>
     236</presets>
     237}}}
     238
     239'''Samples'''
     240||= Template =||= Tags =||= Result =||
     241|| `House number {addr:housenumber}` || `addr:housenumber=10` || House number 10
     242|| `?{ 'House number {addr:housenumber} at {addr:street}' | 'House number {addr:housenumber}'  }` || `addr:housenumber=10` || House number 10
     243|| || `addr:housenumber=10 addr:street=Abbey road` || House number 10 at Abbey road
     244|| `?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' | admin_level = 6 'NUTS 3' |  'Admin level {admin_level}'}` ||  `admin_level=4` || NUTS 2
     245|| || `admin_level=5` || Admin level 5
     246|| `{admin_level} - {name} !{parent() type=boundary '?{'(part of {admin_level} - {name})' | ''}'}` || `admin_level=6 name=Vysocina`, member of relation `admin_level=4 name=Jihovychod` || 6 - Vysocina (part of Jihovychod)
     247|| ||  `admin_level=2 name=Czech republic` (no parents) || 2 - Czech republic
     248\\
     249
     250====== Syntax ======
     251* `{var}` - use value of variable var
     252* `?{condition1 'value1' | condition2 'value2 | 'value3'}` - use value1 if condition1 is satisfied, value3 is no condition is satisfied. Condition can be either explicit -  the same expression as in search or filters is used - or implicit; the value is used when all variables used inside exist
     253* `!{search_expression 'template'}` - search_expression is evaluated and first matching primitive is used as context for template. Useful for example to get tags of parent relation.
     254\\
     255
     256====== Available values ======
     257For formatting of OSM primitives , the value of any tag can be used. You can use `{special:everything}` to see what values are available for your gpx waypoints.
     258
     259Some additional variables are available  via the special prefix:
     260- `{special:everything}` prints all available values, available for formatting of both primitives and waypoints.
     261- `{special:id}` prints the ID of an osm primitive
     262- `{special:localName}` prints the localized name, that is the value of `name:lang` for your language if it is available or the value of the name tag if it doesn't.
     263\\
    200264
    201265=== Deprecated Attributes ===
     
    206270 required="true"::
    207271  replaced by `match` since [5155]
     272\\
    208273
    209274== Translation ==
    210 To support translations, all textual elements ("name", "text", "display_values") may also be localized. (E.g. "de.name" would represent the name in case German language support is loaded.)
    211 
    212 In JOSM internally ([source:josm/trunk/data/defaultpresets.xml internal preset]) 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. 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. The translation for the internal preset is done at [https://translations.launchpad.net/josm/trunk Launchpad] (and will probably change to another service in the future, since the Launchpad web interface often produces timeout errors, see #8645).
     275To support translations, all textual elements (`name`, `text`, `display_values`) may also be localized. E.g. `de.name` would represent the name in case the German language support is loaded. In the preset code the English term must be the first before possible translations are added.
     276
     277In JOSM internally ([source:josm/trunk/resources/data/defaultpresets.xml internal preset]) 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. 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.
     278
     279The translation for the internal preset is done at [https://translations.launchpad.net/josm/trunk Launchpad] (and will probably change to another service in the future, since the Launchpad web interface often produces timeout errors, see #8645).
     280
     281The translation of external presets on this website is, so far, only possible inline within the preset source code, see #11392.
    213282
    214283== Icon handling ==
    215 See [wiki:Styles#Iconhandling Styles].
     284See [wikitr:/Styles#Iconhandling Styles].
    216285
    217286== See also ==
    218 * [wiki:Presets]
    219 * [wiki:Help/Menu/Presets Presets menu]
    220 * [wiki:Help/Preferences/Map#TaggingPresets Tagging presets preferences]
     287* [wikitr:/Help/Menu/Presets Presets menu]