source: josm/trunk/resources/data/tagging-preset.xsd@ 19173

Last change on this file since 19173 was 18966, checked in by taylor.smock, 10 months ago

See #23290: Add missing regions attributes to text, combo and multiselect

simonpoole (Vespucci dev) pointed out that we were using regions for those
attributes on but did not have them documented in the xsd.

  • Property svn:eol-style set to native
File size: 34.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/tagging-preset-1.0"
3 xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0"
4 elementFormDefault="qualified">
5
6 <!-- Localized attributes (for example de.description are not supported
7 by xsd, so every element needs <anyAttribute/> To cover at least some common
8 errors, elements have specified prohibited attributes -->
9
10 <element name="annotations" type="tns:root" />
11 <element name="presets" type="tns:root">
12 <unique name="chunk_id">
13 <selector xpath=".//tns:chunk"/>
14 <field xpath="@id"/>
15 </unique>
16 <keyref name="chunk_ref" refer="tns:chunk_id">
17 <selector xpath=".//tns:reference"/>
18 <field xpath="@ref"/>
19 </keyref>
20 </element>
21
22 <complexType name="root">
23 <annotation>
24 <documentation>
25 Has to be the main tag of the file.
26 </documentation>
27 </annotation>
28 <complexContent>
29 <extension base="tns:group-parent">
30 <attribute name="author" type="string">
31 <annotation>
32 <documentation>
33 The name of the author of the preset.
34 </documentation>
35 </annotation>
36 </attribute>
37 <attribute name="version" type="string">
38 <annotation>
39 <documentation>
40 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]]".
41 </documentation>
42 </annotation>
43 </attribute>
44 <attribute name="shortdescription" type="string">
45 <annotation>
46 <documentation>
47 Very short overview description i.e. the "name" of the preset.
48 <br/>
49 May be localized (i.e. de.shortdescription)
50 </documentation>
51 </annotation>
52 </attribute>
53 <attribute name="description" type="string">
54 <annotation>
55 <documentation>
56 Description what the file contains.
57 <br/>
58 May be localized (i.e. de.description)
59 </documentation>
60 </annotation>
61 </attribute>
62 <attribute name="link" type="string">
63 <annotation>
64 <documentation>
65 Web link to further details.
66 <br/>
67 May be localized (i.e. de.link)
68 </documentation>
69 </annotation>
70 </attribute>
71 <attribute name="baselanguage" type="string">
72 <annotation>
73 <documentation>
74 When the base language is not English, specify it here (using non English preset texts will prevent automatic translation, once it is implemented (#11392)).
75 </documentation>
76 </annotation>
77 </attribute>
78
79 <anyAttribute processContents="skip" />
80 </extension>
81 </complexContent>
82 </complexType>
83
84 <complexType name="group-parent">
85 <sequence>
86 <choice minOccurs="1" maxOccurs="unbounded">
87 <element name="chunk" type="tns:chunk"/>
88 <element name="group" type="tns:group" />
89 <element name="item" type="tns:item" />
90 <element name="separator" type="tns:separator" />
91 </choice>
92 </sequence>
93 <attributeGroup ref="tns:attributes.icon" />
94
95 <attribute name="type" use="prohibited" />
96 <attribute name="text" use="prohibited" />
97 <anyAttribute processContents="skip" />
98 </complexType>
99
100 <complexType name="group">
101 <annotation>
102 <documentation>
103 Used to group items in sub menus. name is required, icon is optional attribute.
104 </documentation>
105 </annotation>
106 <complexContent>
107 <extension base="tns:group-parent">
108 <attributeGroup ref="tns:attributes.name" />
109 <attributeGroup ref="tns:attributes.regions"/>
110 </extension>
111 </complexContent>
112 </complexType>
113
114 <complexType name="separator">
115 <annotation>
116 <documentation>
117 Insert a line separator into the menu.
118 </documentation>
119 </annotation>
120 </complexType>
121
122 <complexType name="item">
123 <annotation>
124 <documentation>
125 Every item is one annotation set to select from. name is required, type and preset_name_label are recommended and icon, name_template, regions and exclude_regions are optional attributes.
126 </documentation>
127 </annotation>
128 <sequence>
129 <choice minOccurs="0" maxOccurs="unbounded">
130 <group ref="tns:optional_elements" />
131 <element name="key" type="tns:key" />
132 <element name="optional" type="tns:optional" minOccurs="0" />
133 </choice>
134 <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
135 </sequence>
136 <attributeGroup ref="tns:attributes.name" />
137 <attributeGroup ref="tns:attributes.icon" />
138 <attributeGroup ref="tns:attributes.regions"/>
139 <attribute name="type" type="string">
140 <annotation>
141 <documentation><![CDATA[
142 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.
143 ]]></documentation>
144 </annotation>
145 </attribute>
146 <attribute name="name_template" type="string">
147 <annotation>
148 <documentation>
149 Custom name formatter for OSM primitives matching this preset. See #name_templatedetails for details.
150 </documentation>
151 </annotation>
152 </attribute>
153 <attribute name="name_template_filter" type="string">
154 <annotation>
155 <documentation>
156 Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or the Selection).
157 </documentation>
158 </annotation>
159 </attribute>
160 <attribute name="match_expression" type="string">
161 <annotation>
162 <documentation>
163 Additional criteria for matching primitives. Specified in <a href="https://josm.openstreetmap.de/wiki/Help/Action/Search">JOSM search syntax</a>.
164 For instance, a preset with <code>match_expression="foo=bar"</code> requires OSM objects to have the tag <code>foo=bar</code>.
165 You may want to use the <code>match_expression</code> to exclude certain OSM objects, for instance when a more specific preset is present.
166 </documentation>
167 </annotation>
168 </attribute>
169 <attribute name="preset_name_label" type="boolean">
170 <annotation>
171 <documentation>
172 Whether to insert "[preset name]" label in dialog (defaults to "false" for backward-compatibility on external presets).
173 </documentation>
174 </annotation>
175 </attribute>
176
177 <attribute name="text" use="prohibited" />
178 <anyAttribute processContents="skip" />
179 </complexType>
180
181 <complexType name="optional">
182 <annotation>
183 <documentation><![CDATA[
184 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 />
185 ]]></documentation>
186 </annotation>
187 <group ref="tns:optional_elements" maxOccurs="unbounded" />
188 <attributeGroup ref="tns:attributes.text" />
189 </complexType>
190
191 <complexType name="chunk">
192 <annotation>
193 <documentation>
194 To define a template of elements for later (repeated) use. The id attribute is mandatory.
195 </documentation>
196 </annotation>
197 <choice minOccurs="1" maxOccurs="1">
198 <sequence>
199 <choice minOccurs="1" maxOccurs="unbounded">
200 <group ref="tns:optional_elements" />
201 <element name="key" type="tns:key" />
202 <element name="optional" type="tns:optional" minOccurs="0" />
203 <element name="roles" type="tns:roles" minOccurs="0" />
204 </choice>
205 </sequence>
206 <sequence>
207 <!-- Cannot use tns:list_elements here because reference is present both in optional_elements and list_elements
208 so it violates cos-nonambig: Unique Particle Attribution :
209 <group ref="tns:list_elements" minOccurs="1" maxOccurs="unbounded" />-->
210 <element name="list_entry" type="tns:list_entry" minOccurs="1" maxOccurs="unbounded" />
211 </sequence>
212 <sequence>
213 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
214 </sequence>
215 </choice>
216 <attribute name="id" type="ID" use="required">
217 <annotation>
218 <documentation><![CDATA[
219 The unique identifier for this <chunk>.
220 ]]></documentation>
221 </annotation>
222 </attribute>
223 </complexType>
224
225 <complexType name="reference">
226 <attribute name="ref" type="IDREF" use="required" />
227 </complexType>
228
229 <group name="optional_elements">
230 <choice>
231 <element name="label" type="tns:label" />
232 <element name="space" type="tns:space" />
233 <element name="link" type="tns:link" />
234 <element name="preset_link" type="tns:preset_link" />
235 <element name="text" type="tns:text" />
236 <element name="combo" type="tns:combo" />
237 <element name="multiselect" type="tns:multiselect" />
238 <element name="checkgroup" type="tns:checkgroup" />
239 <element name="check" type="tns:check" />
240 <element name="item_separator" type="tns:separator" />
241 <element name="reference" type="tns:reference" />
242 </choice>
243 </group>
244
245 <group name="list_elements">
246 <choice>
247 <element name="list_entry" type="tns:list_entry" />
248 <element name="reference" type="tns:reference" />
249 </choice>
250 </group>
251
252 <complexType name="key">
253 <annotation>
254 <documentation>
255 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.
256 </documentation>
257 </annotation>
258 <attribute name="key" type="string" use="required">
259 <annotation>
260 <documentation>
261 This specifies the property key that will be modified by the item.
262 </documentation>
263 </annotation>
264 </attribute>
265 <attribute name="value" type="string">
266 <annotation>
267 <documentation><![CDATA[
268 Specify a value to be entered in the <key> tag.
269 ]]></documentation>
270 </annotation>
271 </attribute>
272 <attribute name="match" type="tns:match" />
273 </complexType>
274
275 <complexType name="link">
276 <annotation>
277 <documentation>
278 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.
279 </documentation>
280 </annotation>
281 <attribute name="wiki" type="string" />
282 <attribute name="href" type="string" />
283 <attributeGroup ref="tns:attributes.text" />
284 <attributeGroup ref="tns:attributes.icon" />
285
286 <attribute name="name" use="prohibited" />
287 <anyAttribute processContents="skip" />
288 </complexType>
289
290 <complexType name="preset_link">
291 <annotation>
292 <documentation><![CDATA[
293 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.
294 ]]></documentation>
295 </annotation>
296 <attribute name="preset_name" type="string" use="required">
297 <annotation>
298 <documentation>
299 The exact name of the preset to link to.
300 </documentation>
301 </annotation>
302 </attribute>
303 <attributeGroup ref="tns:attributes.text" />
304 <attribute name="name" use="prohibited" />
305 <anyAttribute processContents="skip" />
306 </complexType>
307
308 <complexType name="label">
309 <annotation>
310 <documentation>
311 Labels are static texts for display. text is a required attribute, icon and icon_size are optional.
312 </documentation>
313 </annotation>
314 <attributeGroup ref="tns:attributes.text" />
315 <attributeGroup ref="tns:attributes.icon" />
316
317 <attribute name="name" use="prohibited" />
318 <anyAttribute processContents="skip" />
319 </complexType>
320
321 <complexType name="space">
322 <annotation>
323 <documentation>
324 Add some space (i.e. a newline).
325 </documentation>
326 </annotation>
327 </complexType>
328
329 <complexType name="text">
330 <attributeGroup ref="tns:attributes.key" />
331 <attributeGroup ref="tns:attributes.text" />
332 <attributeGroup ref="tns:attributes.icon" />
333 <attribute name="use_last_as_default" type="tns:last_default" />
334 <attribute name="auto_increment" type="string">
335 <annotation>
336 <documentation><![CDATA[
337 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.
338 ]]></documentation>
339 </annotation>
340 </attribute>
341 <attribute name="match" type="tns:match" />
342 <attributeGroup ref="tns:attributes.length" />
343 <attributeGroup ref="tns:attributes.regions"/>
344 <attribute name="alternative_autocomplete_keys" type="string">
345 <annotation>
346 <documentation><![CDATA[
347 A comma separated list of alternative keys to use for auto completion of <text>.
348 ]]></documentation>
349 </annotation>
350 </attribute>
351 <attribute name="value_template" type="string">
352 <annotation>
353 <documentation><![CDATA[
354 A template to generate the value automatically based on other <text> values of this preset.
355 For instance, "Bus {ref}: {from} → {to}" can be used to generate the name of a bus route relation.
356 ]]></documentation>
357 </annotation>
358 </attribute>
359
360 <attribute name="type" use="prohibited" />
361 <attribute name="name" use="prohibited" />
362 <attribute name="value" use="prohibited" />
363 <attribute name="values" use="prohibited" />
364 <anyAttribute processContents="skip" />
365 </complexType>
366
367 <complexType name="list_entry">
368 <annotation>
369 <documentation><![CDATA[
370 Used in <combo/> and <multiselect/>. More information see short_descriptions below. The attributes are value, display_value, short_description, icon, icon_size, regions, and exclude_regions.
371 ]]></documentation>
372 </annotation>
373 <attribute name="value" type="string" use="required" />
374 <attribute name="value_context" type="string" />
375 <attribute name="display_value" type="string" />
376 <attribute name="short_description" type="string">
377 <annotation>
378 <documentation><![CDATA[
379 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="" />
380 ]]></documentation>
381 </annotation>
382 </attribute>
383 <attributeGroup ref="tns:attributes.icon" />
384 <attributeGroup ref="tns:attributes.regions"/>
385 <anyAttribute processContents="skip" />
386 </complexType>
387
388 <complexType name="combo">
389 <annotation>
390 <documentation>
391 <p>
392 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, regions, and exclude_regions are optional.
393 </p>
394 <p>
395 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.
396 </p>
397 <p>
398 If the key is colour or colour:* or *:colour, a color preview and color picker is added on the right (see #8352).
399 </p>
400 </documentation>
401 </annotation>
402 <!-- use either list_entry's or a combination of values/display_values -->
403 <sequence>
404 <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
405 </sequence>
406 <attributeGroup ref="tns:attributes.key" />
407 <attributeGroup ref="tns:attributes.text" />
408 <attributeGroup ref="tns:attributes.icon" />
409 <attributeGroup ref="tns:attributes.values" />
410 <attribute name="use_last_as_default" type="tns:last_default" />
411 <attribute name="editable" type="boolean">
412 <annotation>
413 <documentation>
414 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.
415 </documentation>
416 </annotation>
417 </attribute>
418 <attribute name="match" type="tns:match" />
419 <attributeGroup ref="tns:attributes.length" />
420 <attributeGroup ref="tns:attributes.regions"/>
421
422 <attribute name="type" use="prohibited" />
423 <attribute name="value" use="prohibited" />
424 <attribute name="name" use="prohibited" />
425 <attribute name="delete-if-empty" use="prohibited" />
426 <attribute name="display-values" use="prohibited" />
427 <anyAttribute processContents="skip" />
428 </complexType>
429
430 <complexType name="multiselect">
431 <!-- use either list_entry's or a combination of values/display_values -->
432 <sequence>
433 <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
434 </sequence>
435 <attributeGroup ref="tns:attributes.key" />
436 <attributeGroup ref="tns:attributes.text" />
437 <attributeGroup ref="tns:attributes.icon" />
438 <attributeGroup ref="tns:attributes.values" />
439 <attributeGroup ref="tns:attributes.regions"/>
440 <attribute name="use_last_as_default" type="tns:last_default" />
441 <attribute name="match" type="tns:match" />
442
443 <attribute name="type" use="prohibited" />
444 <attribute name="value" use="prohibited" />
445 <attribute name="name" use="prohibited" />
446 <attribute name="delete-if-empty" use="prohibited" />
447 <attribute name="display-values" use="prohibited" />
448 <anyAttribute processContents="skip" />
449 </complexType>
450
451 <complexType name="checkgroup">
452 <annotation>
453 <documentation>
454 To group checks. The columns attribute is required.
455 </documentation>
456 </annotation>
457 <sequence>
458 <choice minOccurs="1" maxOccurs="unbounded">
459 <element name="check" type="tns:check" />
460 </choice>
461 </sequence>
462 <attribute name="columns" type="positiveInteger">
463 <annotation>
464 <documentation><![CDATA[
465 the number of columns of grouped <check />
466 ]]></documentation>
467 </annotation>
468 </attribute>
469 <anyAttribute processContents="skip" />
470 </complexType>
471
472 <complexType name="check">
473 <attributeGroup ref="tns:attributes.key" />
474 <attributeGroup ref="tns:attributes.text" />
475 <attribute name="value_on" type="string">
476 <annotation>
477 <documentation><![CDATA[
478 Specify the true value to be entered in the <key /> tag of a checked <check /> (default is "yes").
479 ]]></documentation>
480 </annotation>
481 </attribute>
482 <attribute name="value_off" type="string">
483 <annotation>
484 <documentation><![CDATA[
485 Specify the false value to be entered in the <key /> tag of a checked <check /> (default is "no").
486 ]]></documentation>
487 </annotation>
488 </attribute>
489 <attribute name="disable_off" type="boolean">
490 <annotation>
491 <documentation><![CDATA[
492 Whether the off value of a <check /> is disabled in the dialog, i.e., only unset or "yes" are provided.
493 ]]></documentation>
494 </annotation>
495 </attribute>
496 <attribute name="match" type="tns:match" />
497 <attributeGroup ref="tns:attributes.icon" />
498 <attributeGroup ref="tns:attributes.regions"/>
499
500 <attribute name="name" use="prohibited" />
501 <attribute name="type" use="prohibited" />
502 <attribute name="value" use="prohibited" />
503 <anyAttribute processContents="skip" />
504 </complexType>
505
506 <simpleType name="check_default">
507 <restriction base="string">
508 <enumeration value="on" />
509 <enumeration value="off" />
510 </restriction>
511 </simpleType>
512
513 <simpleType name="last_default">
514 <annotation>
515 <documentation><![CDATA[
516 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".
517 ]]></documentation>
518 </annotation>
519 <restriction base="string">
520 <enumeration value="true" />
521 <enumeration value="false" />
522 <enumeration value="force" />
523 </restriction>
524 </simpleType>
525
526 <simpleType name="match">
527 <annotation>
528 <documentation>
529 <p>
530 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 Tags/Membership dialog.
531 </p>
532
533 <ul>
534 <li>none: neutral, i.e., do not consider this item for matching</li>
535 <li>key!: positive if key matches, negative otherwise</li>
536 <li>keyvalue: positive if key and value matches, neutral otherwise</li>
537 <li>keyvalue!: positive if key and value matches, negative otherwise</li>
538 </ul>
539
540 <p><![CDATA[
541 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 />.
542 ]]></p>
543 </documentation>
544 </annotation>
545 <restriction base="string">
546 <enumeration value="none" />
547 <enumeration value="key" />
548 <enumeration value="key!" />
549 <enumeration value="keyvalue" />
550 <enumeration value="keyvalue!" />
551 </restriction>
552 </simpleType>
553
554 <complexType name="roles">
555 <group ref="tns:roles_elements" maxOccurs="unbounded" />
556 </complexType>
557
558 <group name="roles_elements">
559 <choice>
560 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
561 <element name="reference" type="tns:reference" />
562 </choice>
563 </group>
564
565 <complexType name="role">
566 <annotation>
567 <documentation>
568 To specify possible roles of members in relations. The key attribute is required, text, requisite, count, type, member_expression, regions, and exclude_regions are optional.
569 </documentation>
570 </annotation>
571 <attribute name="key" type="string">
572 <annotation>
573 <documentation>
574 The role name used in a relation.
575 </documentation>
576 </annotation>
577 </attribute>
578 <attributeGroup ref="tns:attributes.text" />
579 <attribute name="requisite" type="tns:role_requisite" />
580 <attribute name="type" type="string" />
581 <attribute name="count" type="integer" />
582 <attribute name="member_expression" type="string" />
583 <attribute name="regexp" type="boolean" />
584 <attributeGroup ref="tns:attributes.regions"/>
585 <anyAttribute processContents="skip" />
586 </complexType>
587
588 <simpleType name="role_requisite">
589 <annotation>
590 <documentation>
591 If a relation member is optional or required. Default is "optional".
592 </documentation>
593 </annotation>
594 <restriction base="string">
595 <enumeration value="required" />
596 <enumeration value="optional" />
597 </restriction>
598 </simpleType>
599
600 <!-- Types and documentation for attributes -->
601
602 <attributeGroup name="attributes.name">
603 <attribute name="name" type="string" use="required">
604 <annotation>
605 <documentation>
606 Specify a name for an item. This name will be used in the GUI to display the tagging preset.
607 </documentation>
608 </annotation>
609 </attribute>
610 <attribute name="name_context" type="string">
611 <annotation>
612 <documentation>
613 Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
614 </documentation>
615 </annotation>
616 </attribute>
617 </attributeGroup>
618
619 <attributeGroup name="attributes.key">
620 <attribute name="key" type="string" use="required">
621 <annotation>
622 <documentation>
623 This specifies the property key that will be modified by the item.
624 </documentation>
625 </annotation>
626 </attribute>
627 <attribute name="default" type="string">
628 <annotation>
629 <documentation><![CDATA[
630 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. If no value for default is specified, no value is set to the key. Used in >check /<, >text /<, >combo /< and >multiselect /<.
631 ]]></documentation>
632 </annotation>
633 </attribute>
634 </attributeGroup>
635
636 <attributeGroup name="attributes.text">
637 <attribute name="text" type="string">
638 <annotation>
639 <documentation><![CDATA[
640 The description, that will be displayed before (after in case of <check />) the gui element. Also used for <label> and <optional>.
641 ]]></documentation>
642 </annotation>
643 </attribute>
644 <attribute name="text_context" type="string">
645 <annotation>
646 <documentation>
647 Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
648 </documentation>
649 </annotation>
650 </attribute>
651 </attributeGroup>
652
653 <attributeGroup name="attributes.values">
654 <attribute name="values" type="string">
655 <annotation>
656 <documentation>
657 A list of entries. 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.
658 </documentation>
659 </annotation>
660 </attribute>
661 <attribute name="values_from" type="string">
662 <annotation>
663 <documentation>
664 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".
665 </documentation>
666 </annotation>
667 </attribute>
668 <attribute name="values_context" type="string">
669 <annotation>
670 <documentation>
671 Translation context for values attribute to separate equals words with different meaning (not required for in-file translations).
672 </documentation>
673 </annotation>
674 </attribute>
675 <attribute name="values_no_i18n" type="boolean">
676 <annotation>
677 <documentation>
678 Disables internationalisation for value to avoid mistakes, see #11696. Default is "false". (Useful e.g. for opening hours or brand names.)
679 </documentation>
680 </annotation>
681 </attribute>
682 <attribute name="values_sort" type="boolean">
683 <annotation>
684 <documentation>
685 Values of 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".<br />
686 Users can globally disable sorting with the preference key taggingpreset.sortvalues.
687 </documentation>
688 </annotation>
689 </attribute>
690 <attribute name="display_values" type="string">
691 <annotation>
692 <documentation>
693 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.
694 </documentation>
695 </annotation>
696 </attribute>
697 <attribute name="values_searchable" type="boolean">
698 <annotation>
699 <documentation>
700 Whether to search in (display_)values when searching for presets.
701 </documentation>
702 </annotation>
703 </attribute>
704 <attribute name="delimiter" type="string">
705 <annotation>
706 <documentation><![CDATA[
707 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.
708 ]]></documentation>
709 </annotation>
710 </attribute>
711 </attributeGroup>
712
713 <attributeGroup name="attributes.icon">
714 <attribute name="icon" type="string">
715 <annotation>
716 <documentation><![CDATA[
717 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 Icon handling how icons can be specified.
718 ]]></documentation>
719 </annotation>
720 </attribute>
721 <attribute name="icon_size" type="integer">
722 <annotation>
723 <documentation><![CDATA[
724 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>).
725 ]]></documentation>
726 </annotation>
727 </attribute>
728 </attributeGroup>
729
730 <attributeGroup name="attributes.length">
731 <attribute name="length" type="positiveInteger">
732 <annotation>
733 <documentation><![CDATA[
734 The length of a <text /> or <combo /> box (number of characters allowed).
735 ]]></documentation>
736 </annotation>
737 </attribute>
738 </attributeGroup>
739
740 <attributeGroup name="attributes.regions">
741 <attribute name="regions" type="string">
742 <annotation>
743 <documentation>
744 Comma separated list of countries this preset group or item is applicable for. If not specified, the preset is applicable for all countries.
745 </documentation>
746 </annotation>
747 </attribute>
748 <attribute name="exclude_regions" type="boolean">
749 <annotation>
750 <documentation>
751 If true, invert the meaning of regions.
752 </documentation>
753 </annotation>
754 </attribute>
755 </attributeGroup>
756
757</schema>
Note: See TracBrowser for help on using the repository browser.