Changeset 7667 in josm


Ignore:
Timestamp:
2014-10-29T11:17:47+01:00 (9 years ago)
Author:
stoecker
Message:

move format description to wiki

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r7653 r7667  
    88    http://openclipart.org/media/view/media/clip_art
    99    http://www.sjjb.co.uk/mapicons/ (meanwhile in osm svn)
     10
     11    Format description: https://josm.openstreetmap.de/wiki/TaggingPresets
    1012-->
    11 <!--
    12 item:
    13   name: the text to display
    14   icon: the icon to display
    15   - relative to the icon path
    16   - URL's are also supported to allow remote icons (are cached locally)
    17   type: the data types - way,node,relation,closedway (separated by comma)
    18   name_template: define custom formatting for OSM primitives
    19                  see https://josm.openstreetmap.de/wiki/NameTemplate
    20   preset_name_label: whether to insert "[preset name]" label in dialog
    21                      (defaults to "false" for backward-compatibility on external presets)
    2213
    23 group: a group of items (same syntax as "item")
    24 
    25 link: link to the relating map features website
    26   href: the URL
    27 
    28 preset_link: a link to an other preset
    29   preset_name: the exact name of the preset to link to
    30 
    31 label: simple static text label
    32   text: the text to display
    33   icon: location of icon to display (optional)
    34   icon_size: maximal size of icon (optional). If no value is given, default is 16px
    35 
    36 space: empty line
    37 
    38 optional: optional tags, short for "space" plus "label" plus "space"
    39   text: the text to display (defaults to "Optional Attributes:")
    40 
    41 separator: separator line in menus
    42 
    43 item_separator: horizontal separator line between items (in window)
    44 
    45 key: fixed key/value pair to be set
    46   key: key to set
    47   value: value to set
    48   match: none/key/key!/keyvalue/keyvalue! (default is "keyvalue!", see below for more information)
    49 
    50 text: text box
    51   key: key to set
    52   text: fixed label to display
    53   default: default string to display (defaults to "")
    54   use_last_as_default: true/false/force (default is "false")
    55   auto_increment: may contain a comma separated list of integer increments or
    56                   decrements, e.g. "-2,-1,+1,+2"; a button will be shown next
    57                   to the text field for each value, allowing the user to select
    58                   auto-increment with the given stepping. auto-increment only
    59                   happens if the user selects it. default is no auto-increment;
    60                   mutually exclusive with use_last_as_default.
    61   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    62   length: length of input box (number of characters allowed)
    63   alternative_autocomplete_keys: comma separated list of alternative keys to use for autocompletion
    64 
    65 combo: combo box, with multiple choices and possible to enter free form text
    66   key: key to set
    67   text: fixed label to display
    68   delimiter: character that separates values (default: comma)
    69   values: separated list of values
    70   values_from: to use instead of "values" if the list of values has to be obtained with a Java method
    71                of this form: public static String[] getValues();
    72                The value must be: "full.package.name.ClassName#methodName"
    73   display_values: comma separated list of values to be displayed instead of the
    74                   database values, order and number must be equal to values
    75   short_descriptions: comma separated list of texts to be displayed below each
    76                       display_value. (Only if it is not possible to describe
    77                       the entry in 2-3 words.) Instead of comma separated list
    78   instead using values, display_values and short_descriptions, the following form is also supported:
    79     <list_entry value="" display_value="" short_description="" icon="" icon_size="" />
    80         icon: location of icon
    81         icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
    82   default: default string to display (defaults to "")
    83   use_last_as_default: true/false/force (default is "false")
    84   editable: allow to add other values as text (default is "true")
    85   match: none/key/key!/keyvalue/keyvalue! (default is none, see below for more information)
    86   values_searchable: true/false (whether to search in combo (display_)values when searching for presets)
    87   length: length of input box (number of characters allowed)
    88 
    89 multiselect: list of values from which zero or more can be selected
    90   key: key to set
    91   text: fixed label to display
    92   delimiter: character that separates values (default: semicolon) - this
    93              will also be used to separate selected values in the tag.
    94   values: delimiter-separated list of values (delimiter can be escaped with backslash)
    95   values_from: to use instead of "values" if the list of values has to be obtained with a Java method
    96                of this form: public static String[] getValues();
    97                The value must be: "full.package.name.ClassName#methodName"
    98   rows: specify the number of rows to display (default -1)
    99   display_values: delimiter-separated list of values to be displayed instead of the
    100                   database values, order and number must be equal to values
    101   short_descriptions: delimiter-separated list of texts to be displayed below each
    102                       display_value. (Only if it is not possible to describe
    103                       the entry in 2-3 words.) Instead of a separated list
    104   instead using values, display_values and short_descriptions, the following form is also supported:
    105     <list_entry value="" display_value="' short_description="" icon="" icon_size="" />
    106         icon: location of icon
    107         icon_size: maximal size of icon. If tag is not setup it is taken default size of icon file
    108   default: default string to display (defaults to "")
    109   use_last_as_default: true/false/force (default is "false")
    110   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    111   values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)
    112 
    113 checkgroup: group of checks
    114   columns: number of columns
    115 
    116 check: checkbox
    117   key: key to set
    118   text: fixed label to display
    119   default: ticked on/off (default is "off")
    120   value_on: the value to set when checked (default is "yes")
    121   value_off: the value to set when unchecked (default is "no")
    122   disable_off: whether the off value is disabled in the dialog, i.e., only unset or yes are provided
    123   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    124 
    125 role: type to specify possible roles in relations
    126   key: the role name used in relation
    127   text: fixed label to display
    128   requisite: optional/required (default is "optional")
    129   count: how often can the role occur (if not given unlimited number is assumed)
    130   type: the data types - way,node,relation,closedway (separated by comma)
    131   member_expression: an expression (cf. search dialog) for objects of this role
    132 
    133 chunk: a template of elements for later (repeated) use
    134   id: the unique identifier for this chunk
    135 
    136 reference: include an earlier defined template
    137   ref: the unique identifier of the (already defined) template to include
    138 
    139  presets: For external files <presets> should have following attributes:
    140    author: the author of the preset
    141    version: a version number of some sort (e.g. creation date)
    142    description: what is your preset meant to be
    143    shortdescription: very short description
    144    link: a link to a helpful website (optional)
    145    icon: an icon for the whole presets
    146  The fields description, shortdescription and link may also be localized (e.g. de.link)
    147 
    148 See also https://josm.openstreetmap.de/wiki/TaggingPresets wiki page.
    149 
    150 The fields "name", "text", "display_values" may also be localized (e.g. de.name).
    151 When translations of equal words but different meanings may conflict, a translation
    152 context should be specified. Use "name_context", "text_context" or "values_context"
    153 for this. The context should be a meaningful short description to help translators.
    154 
    155 In JOSM internally all "name", "text" and "display_values" are translated when
    156 no specific translation has been given in XML file. When no "display_values"
    157 are supplied, then "values" will be treated as "display_values" and translated instead.
    158 
    159 The match attribute allows to change the matching process, i.e., determining whether
    160 the tags of an OSM object fit into this preset.
    161  - none: neutral, i.e., do not consider this item for matching
    162  - key: positive if key matches, neutral otherwise
    163  - key!: positive if key matches, negative otherwise
    164  - keyvalue: positive if key and value matches, neutral otherwise
    165  - keyvalue!: positive if key and value matches, negative otherwise
    166 Note that for a match, at least one positive and no negative is required.
    167 -->
    16814    <!-- Item chunks -->
    16915    <chunk id="surface">
Note: See TracChangeset for help on using the changeset viewer.