Changes between Version 9 and Version 10 of De:TaggingPresets
- Timestamp:
- 2014-10-29T19:34:46+01:00 (12 years ago)
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)]] 2 3 = Objektvorlagen = 3 4 … … 5 6 6 7 == 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 8 Entweder: 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 == 13 Die Beschreibung einer Objektvorlage geschieht in einem einfachen XML Format. Details siehe [#XML unten]. 14 15 Siehe **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** als Beispiel, welches alle Möglichkeiten abdeckt. 16 17 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. 18 19 Um eine Vorlage der Liste der verfügbaren Vorlagen hinzuzufügen, siehe [wiki:De:Presets#Createnewpresets JOSM Objektvorlagen] 20 21 Beispiel: 13 22 [[Image(wiki:TaggingPresets:tagging_screenshot.png,align=right)]] 14 23 … … 32 41 33 42 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 51 44 === Tags === 52 The document prolog :45 ==== The document prolog ==== 53 46 '''<presets>''':: 54 47 Has to be the main tag of the file. Supports following attributes 55 48 * '''xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"''' 56 * '''author''' - the name of the author 57 * '''version''' - a version of the file49 * '''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). 58 51 * '''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 ==== 63 57 '''<!-- this is an example comment -->''':: 64 58 The document can contain embedded comments. 65 Menu creation :59 ==== Menu creation ==== 66 60 '''<group>''':: 67 61 Used to group items in sub menus. ''name'' is required, ''icon'' is optional attribute. … … 70 64 '''<separator/>''':: 71 65 Insert a line separator into the menu. 72 Create instructions for the user :66 ==== Create instructions for the user ==== 73 67 '''<label>''':: 74 68 Labels are static texts for display. ''text'' is a required attribute. … … 77 71 '''<space />''':: 78 72 Add some space (ie a newline) in the preset display. 73 '''<item_separator />''':: 74 Add a horizontal separator line between items (in preset window). 79 75 '''<link>''':: 80 76 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 ==== 82 81 '''<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 84 83 '''<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. 86 85 If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable 87 86 combo boxes can only contain one of the specified values. 88 89 87 '''<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. 91 89 '''<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 === 98 98 The attributes of the tags have the following meaning: 99 99 '''name="a_name"''':: … … 141 141 * keyvalue!: positive if key and value matches, negative otherwise 142 142 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 143 147 144 148 To 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. 145 149 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) 147 152 148 153 {{{ … … 169 174 text: the text to display (defaults to "Optional Attributes:") 170 175 171 item_separator: horizontal separator line between items (in window)172 173 key: fixed key/value pair to be set174 key: key to set175 value: value to set176 match: none/key/key!/keyvalue/keyvalue! (default is "keyvalue!", see below for more information)177 178 176 text: text box 179 177 key: key to set … … 187 185 happens if the user selects it. default is no auto-increment; 188 186 mutually exclusive with use_last_as_default. 189 match: none/key/key!/keyvalue/keyvalue! (default is "none", see below for more information)190 187 length: length of input box (number of characters allowed) 191 188 alternative_autocomplete_keys: comma separated list of alternative keys to use for autocompletion … … 211 208 use_last_as_default: true/false/force (default is "false") 212 209 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)214 210 values_searchable: true/false (whether to search in combo (display_)values when searching for presets) 215 211 length: length of input box (number of characters allowed) … … 236 232 default: default string to display (defaults to "") 237 233 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)239 234 values_searchable: true/false (whether to search in multiselect (display_)values when searching for presets) 240 235 … … 249 244 value_off: the value to set when unchecked (default is "no") 250 245 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)252 246 253 247 role: type to specify possible roles in relations … … 259 253 member_expression: an expression (cf. search dialog) for objects of this role 260 254 261 chunk: a template of elements for later (repeated) use262 id: the unique identifier for this chunk263 264 reference: include an earlier defined template265 ref: the unique identifier of the (already defined) template to include266 267 presets: For external files <presets> should have following attributes:268 author: the author of the preset269 version: a version number of some sort (e.g. creation date)270 description: what is your preset meant to be271 shortdescription: very short description272 link: a link to a helpful website (optional)273 icon: an icon for the whole presets274 The fields description, shortdescription and link may also be localized (e.g. de.link)275 276 255 The fields "name", "text", "display_values" may also be localized (e.g. de.name). 277 256 When translations of equal words but different meanings may conflict, a translation … … 283 262 are supplied, then "values" will be treated as "display_values" and translated instead. 284 263 285 The match attribute allows to change the matching process, i.e., determining whether286 the tags of an OSM object fit into this preset.287 - none: neutral, i.e., do not consider this item for matching288 - key: positive if key matches, neutral otherwise289 - key!: positive if key matches, negative otherwise290 - keyvalue: positive if key and value matches, neutral otherwise291 - keyvalue!: positive if key and value matches, negative otherwise292 Note that for a match, at least one positive and no negative is required.293 264 }}} 294 265 295 == =Benutzung von Symbolen===266 == Benutzung von Symbolen == 296 267 Siehe [wiki:De:Styles#Iconhandling Styles]. 297 268
