Changes between Version 9 and Version 10 of De:TaggingPresets


Ignore:
Timestamp:
2014-10-29T19:34:46+01:00 (7 years ago)
Author:
Klumbumbus
Comment:

update

Legend:

Unmodified
Added
Removed
Modified
  • De:TaggingPresets

    v9 v10  
    1 [[TranslatedPages(revision=58,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.)]]
     1[[TranslatedPages(revision=75,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.)]]
     2[[PageOutline(2-10,Inhaltsverzeichnis)]]
    23= Objektvorlagen =
    34
     
    56
    67== Installieren einer Objektvorlage ==
    7 Öffne den [Help/Action/Preferences Einstellungen Dialog], klicke auf [[Image(source:trunk/images/preferences/map.png,20)]] Karteneinstellungen und selektiere den dritten Reiter [Help/Preferences/Map#TaggingPresets "Objektvorlagen"].
    8 
    9 ----
    10 
    11 ==  Beispiel einer Objektvorlage ==
    12 
     8Entweder:
     9* Klicke im Hauptmenü [De:Help/Menu/Presets Vorlagen] auf "Vorlagen Einstellungen".
     10* Öffne den [Help/Action/Preferences Einstellungen Dialog], klicke auf [[Image(source:trunk/images/preferences/map.png,20)]] Karteneinstellungen und selektiere den dritten Reiter [Help/Preferences/Map#TaggingPresets "Objektvorlagen"].
     11
     12== Eine neue Objektvorlage erstellen ==
     13Die Beschreibung einer Objektvorlage geschieht in einem einfachen XML Format. Details siehe [#XML unten].
     14
     15Siehe **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** als Beispiel, welches alle Möglichkeiten abdeckt.
     16
     17Das vollständige XSD Schema ist im Namensraum URI (http://josm.openstreetmap.de/tagging-preset-1.0) sowie [source:trunk/data/tagging-preset.xsd im Quellverzeichnis] verfügbar.
     18
     19Um eine Vorlage der Liste der verfügbaren Vorlagen hinzuzufügen, siehe [wiki:De:Presets#Createnewpresets JOSM Objektvorlagen]
     20
     21Beispiel:
    1322[[Image(wiki:TaggingPresets:tagging_screenshot.png,align=right)]]
    1423
     
    3241
    3342
    34 == Beim veröffentlichen einer Objektvorlage – ergänze die Liste der Objektvorlagen ==
    35 
    36 Siehe [wiki:De:Presets JOSM Objektvorlagen].
    37 
    38 
    39 == Veröffentlichen einer neuen Objektvorlage – XML Format Beschreibung ==
    40 
    41 Die Beschreibung einer Objektvorlage geschieht in einem einfachen XML Format.
    42 
    43 Siehe **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** als Beispiel, welches alle Möglichkeiten abdeckt.
    44 
    45 Das vollständige XSD Schema ist im Namensraum URI (http://josm.openstreetmap.de/tagging-preset-1.0) sowie [source:trunk/data/tagging-preset.xsd im Quellverzeichnis] verfügbar.
    46 
    47 ----
    48 
    49 == Develop a new preset – XML Format description (outdated!) ==
    50 
     43== XML Format Beschreibung (nicht aktuell!) ==#XML
    5144=== Tags ===
    52 The document prolog:
     45==== The document prolog ====
    5346 '''<presets>'''::
    5447   Has to be the main tag of the file. Supports following attributes
    5548   * '''xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"'''
    56    * '''author''' - the name of the author
    57    * '''version''' - a version of the file
     49   * '''author''' - the name of the author of the preset
     50   * '''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).
    5851   * '''description''' (i18n) - description what the file contains
    59    * '''shortdescription''' (i18n) - short overview description
    60    * '''link''' (i18n) - web link to further details
    61    * '''icon''' - informational icon for the preset
    62 Comments:
     52   * '''shortdescription''' (i18n) - very short overview description i.e. the "name" of the preset
     53   * '''link''' (i18n) - web link to further details (optional)
     54   * '''icon''' - informational icon for the whole preset. (For presets managed in this wiki 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).
     56==== Comments ====
    6357 '''<!-- this is an example comment -->'''::
    6458  The document can contain embedded comments.
    65 Menu creation:
     59==== Menu creation ====
    6660 '''<group>'''::
    6761   Used to group items in sub menus. ''name'' is required, ''icon'' is optional attribute.
     
    7064 '''<separator/>'''::
    7165   Insert a line separator into the menu.
    72 Create instructions for the user:
     66==== Create instructions for the user ====
    7367 '''<label>'''::
    7468   Labels are static texts for display. ''text'' is a required attribute.
     
    7771 '''<space />'''::
    7872   Add some space (ie a newline) in the preset display.
     73 '''<item_separator />'''::
     74   Add a horizontal separator line between items (in preset window).
    7975 '''<link>'''::
    8076   Specify a web link for this feature or to anything else of use. The ''href'' attribute is required.
    81 Attribute entry and selection dialog boxes:
     77==== Set a fixed key value pair ====
     78 '''<key>'''::
     79   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.
     80==== Attribute entry and selection dialog boxes ====
    8281 '''<text>'''::
    83    A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'' and ''required'' is optional
     82   A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'', ''match'' and ''required'' is optional
    8483 '''<combo>'''::
    85    Displays a multiple choice combo box. ''key'' and ''values'' are mandatory and ''text'', ''default'', ''editable'' and ''required'' is optional.
     84   Displays a multiple choice combo box. ''key'' and ''values'' are mandatory and ''text'', ''default'', ''editable'', ''match'' and ''required'' is optional.
    8685   If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable
    8786   combo boxes can only contain one of the specified values.
    88 
    8987 '''<multiselect>'''::
    90    Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'', 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.
     88   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.
    9189 '''<check>'''::
    92    A checkbox which the user can only select or deselect. The ''key'' attribute is mandatory. ''text'', ''default'' and ''required'' is optional.
    93 Set a key value pair:
    94  '''<key>'''::
    95    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.
    96 
    97 === Attribute ===
     90   A checkbox which the user can only select or deselect. The ''key'' attribute is mandatory. ''text'', ''default'', ''match'' and ''required'' is optional.
     91==== Templates ====
     92 '''<chunk>'''::
     93   To define a template of elements for later (repeated) use. The ''id'' attribute is mandatory.
     94 '''<reference>'''::
     95   To include an earlier defined template. The ''ref'' attribute is mandatory.
     96
     97=== Attributes ===
    9898The attributes of the tags have the following meaning:
    9999 '''name="a_name"'''::
     
    141141    * keyvalue!: positive if key and value matches, negative otherwise
    142142   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>.
     143 '''id="unique_identifier"'''::
     144   the unique identifier for this chunk
     145 '''ref="unique_identifier"'''::
     146   the unique identifier of the (already defined) template to include
    143147
    144148To support translations, all textual elements may be used in translated form. E.g. "de.name" would represent the name in case German language support is loaded.
    145149
    146 === Format description from XML document (needs to be joined with above texts) ===
     150== Format description from XML document (needs to be joined with above texts) ==
     151 (delete here the parts which you have joined with above texts)
    147152
    148153{{{
     
    169174  text: the text to display (defaults to "Optional Attributes:")
    170175
    171 item_separator: horizontal separator line between items (in window)
    172 
    173 key: fixed key/value pair to be set
    174   key: key to set
    175   value: value to set
    176   match: none/key/key!/keyvalue/keyvalue! (default is "keyvalue!", see below for more information)
    177 
    178176text: text box
    179177  key: key to set
     
    187185                  happens if the user selects it. default is no auto-increment;
    188186                  mutually exclusive with use_last_as_default.
    189   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    190187  length: length of input box (number of characters allowed)
    191188  alternative_autocomplete_keys: comma separated list of alternative keys to use for autocompletion
     
    211208  use_last_as_default: true/false/force (default is "false")
    212209  editable: allow to add other values as text (default is "true")
    213   match: none/key/key!/keyvalue/keyvalue! (default is none, see below for more information)
    214210  values_searchable: true/false (whether to search in combo (display_)values when searching for presets)
    215211  length: length of input box (number of characters allowed)
     
    236232  default: default string to display (defaults to "")
    237233  use_last_as_default: true/false/force (default is "false")
    238   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    239234  values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets)
    240235
     
    249244  value_off: the value to set when unchecked (default is "no")
    250245  disable_off: whether the off value is disabled in the dialog, i.e., only unset or yes are provided
    251   match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)
    252246
    253247role: type to specify possible roles in relations
     
    259253  member_expression: an expression (cf. search dialog) for objects of this role
    260254
    261 chunk: a template of elements for later (repeated) use
    262   id: the unique identifier for this chunk
    263 
    264 reference: include an earlier defined template
    265   ref: the unique identifier of the (already defined) template to include
    266 
    267  presets: For external files <presets> should have following attributes:
    268    author: the author of the preset
    269    version: a version number of some sort (e.g. creation date)
    270    description: what is your preset meant to be
    271    shortdescription: very short description
    272    link: a link to a helpful website (optional)
    273    icon: an icon for the whole presets
    274  The fields description, shortdescription and link may also be localized (e.g. de.link)
    275 
    276255The fields "name", "text", "display_values" may also be localized (e.g. de.name).
    277256When translations of equal words but different meanings may conflict, a translation
     
    283262are supplied, then "values" will be treated as "display_values" and translated instead.
    284263
    285 The match attribute allows to change the matching process, i.e., determining whether
    286 the tags of an OSM object fit into this preset.
    287  - none: neutral, i.e., do not consider this item for matching
    288  - key: positive if key matches, neutral otherwise
    289  - key!: positive if key matches, negative otherwise
    290  - keyvalue: positive if key and value matches, neutral otherwise
    291  - keyvalue!: positive if key and value matches, negative otherwise
    292 Note that for a match, at least one positive and no negative is required.
    293264}}}
    294265
    295 === Benutzung von Symbolen ===
     266== Benutzung von Symbolen ==
    296267Siehe [wiki:De:Styles#Iconhandling Styles].
    297268