Changes between Version 170 and Version 171 of TaggingPresets


Ignore:
Timestamp:
2020-05-04T21:48:39+02:00 (6 years ago)
Author:
skyper
Comment:

added some slashes

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v170 v171  
    6868 <item>::
    6969  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.
    70  <separator/>::
     70 <separator />::
    7171  Insert a line separator into the menu.
    7272\\
    7373
    7474==== Preset window layout ====
    75  <label>::
     75 <label />::
    7676  Labels are static texts for display. `text` is a required attribute, `icon` and `icon_size` are optional.
    7777 <space />::
    78   Add some space (ie a newline).
     78  Add some space (i.e. a newline).
    7979 <optional>::
    80   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 />`
     80  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 />`
    8181 <item_separator />::
    8282  Add a horizontal separator line between items.
    83  <link>::
    84   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.
     83 <link />::
     84  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.
    8585 <checkgroup>::
    8686  To group checks. The `columns` attribute is required.
    8787 <roles>::
    88   This is required around `<role>` and adds the heading ("Available roles role count elements") to the table which is generated by several `<role>`.
    89  <role>::
     88  This is required around `<role />` and adds the heading ("Available roles role count elements") to the table which is generated by several `<role />`.
     89 <role />::
    9090  To specify possible roles of members in relations. The `key` attribute is required, `text`, `requisite`, `count`, `type` and `member_expression` are optional.
    91  <preset_link>::
    92   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.
     91 <preset_link />::
     92  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.
    9393\\
    9494
    9595==== Set a fixed key value pair ====
    96  <key>::
     96 <key />::
    9797  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.
    9898\\
    9999
    100100==== Attribute entry and selection dialog boxes ====
    101  <text>::
     101 <text />::
    102102  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
    103  <combo>::
     103 <combo />::
    104104  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.\\
    105105  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.\\
    106106  If the key is `colour` or `colour:*` or `*:colour`, a color preview and color picker is added on the right (see #8352).
    107107 [=#multiselect]
    108  <multiselect>::
    109   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.
    110  <list_entry>::
     108 <multiselect />::
     109  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.
     110 <list_entry />::
    111111  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`.
    112  <check>::
     112 <check />::
    113113  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.
    114114\\
     
    130130  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.
    131131 icon="iconname"::
    132   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 [wikitr:/Styles#Iconhandling Icon handling] how icons can be specified.
     132  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 [wikitr:/Styles#Iconhandling Icon handling] how icons can be specified.
    133133 icon_size="a number"::
    134   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>`).
     134  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>`).
    135135 key="some_key"::
    136136  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.
    137137 text="Any text"::
    138   The description, that will be displayed before (after in case of `<check>`) the gui element. Also used for `<label>` and `<optional>`.
     138  The description, that will be displayed before (after in case of `<check />`) the gui element. Also used for `<label>` and `<optional>`.
    139139 text_context="context"::
    140140  Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
    141141 default="default_value"::
    142142  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''.
    143   If no value for default is specified, no value is set to the key. Used in `<check>`, `<text>`, `<combo>` and `<multiselect>`.
     143  If no value for default is specified, no value is set to the key. Used in `<check />`, `<text />`, `<combo />` and `<multiselect />`.
    144144 values="entry1,entry2,entry3"::
    145   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.
     145  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.
    146146 values_from="JAVA code"::
    147147  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".
    148148 values_no_i18n="true|false"::
    149   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.)
     149  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.)
    150150 values_sort="false"::
    151   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"`.\\
     151  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"`.\\
    152152 Users can globally disable sorting with the preference key `taggingpreset.sortvalues`.
    153153 values_context="context"::
    154154  Translation context for values attribute to separate equals words with different meaning (not required for in-file translations).
    155155 display_values="Entry1,Entry2,Entry3"::
    156   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>`.
     156  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 />`.
    157157 value="foobar"::
    158158  Specify a value to be entered in the `<key>` tag.
    159159 value_on="foobar"::
    160   Specify the true value to be entered in the `<key>` tag of a checked `<check>` (default is `"yes"`).
     160  Specify the true value to be entered in the `<key>` tag of a checked `<check />` (default is `"yes"`).
    161161 value_off="foobar"::
    162   Specify the false value to be entered in the `<key>` tag of a unchecked `<check>` (default is `"no"`).
     162  Specify the false value to be entered in the `<key>` tag of a unchecked `<check />` (default is `"no"`).
    163163 disable_off="true"::
    164   Whether the off value of a `<check>` is disabled in the dialog, i.e., only unset or `"yes"` are provided.
     164  Whether the off value of a `<check />` is disabled in the dialog, i.e., only unset or `"yes"` are provided.
    165165 editable="false"::
    166166  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**.
    167167 use_last_as_default="true|false|force"::
    168   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"`.
     168  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"`.
    169169 rows="count"::
    170   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).
     170  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).
    171171 name_template="template", name_template_filter="search expression"::
    172172  Custom name formatter for osm primitives matching this preset. See below [[#name_templatedetails]] for details.
     
    178178  * `keyvalue`: positive if key and value matches, neutral otherwise
    179179  * `keyvalue!`: positive if key and value matches, negative otherwise \\
    180  **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>`.
     180 **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 />`.
    181181 id="unique_identifier"::
    182182  the unique identifier for this `<chunk>`
     
    184184  the unique identifier of the (already defined) template to include
    185185 columns="a number"::
    186   the number of columns of grouped `<check>`
     186  the number of columns of grouped `<check />`
    187187 requisite="optional|required"::
    188188  If a relation member is optional or required. Default is `"optional"`.
     
    198198  Whether to insert "[preset name]" label in dialog (defaults to `"false"` for backward-compatibility on external presets).
    199199 length="a number"::
    200   The length of a `<text>` or `<combo>` box (number of characters allowed).
     200  The length of a `<text />` or `<combo />` box (number of characters allowed).
    201201 alternative_autocomplete_keys="some_key(s)"::
    202202  A comma separated list of alternative keys to use for auto completion of `<text>`.
    203203 auto_increment="-2,-1,+1,+2"::
    204   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`.
     204  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`.
    205205 delimiter="special character"::
    206   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].
     206  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].
    207207 [=#short_description]
    208208 short_descriptions="Entry1,Entry2,Entry3"::
    209209  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="" />`
    210210 values_searchable="true|false"::
    211   Whether to search in `<combo>` or `<multiselect>` `(display_)values` when searching for presets.
     211  Whether to search in `<combo />` or `<multiselect />` `(display_)values` when searching for presets.
    212212\\
    213213