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

Last change on this file since 18918 was 18918, checked in by taylor.smock, 6 months ago

Fix #23290: Validate the regions a tag is expected to be in (patch by Sarabjeet108, modified)

Modifications are as follows:

  • Allow the use of the new region attributes for keys inside a preset
  • Basic tests

regions comes from Vespucci's extensions: https://vespucci.io/tutorials/presets/#extensions

  • Property svn:eol-style set to native
File size: 34.4 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 <attribute name="alternative_autocomplete_keys" type="string">
344 <annotation>
345 <documentation><![CDATA[
346 A comma separated list of alternative keys to use for auto completion of <text>.
347 ]]></documentation>
348 </annotation>
349 </attribute>
350 <attribute name="value_template" type="string">
351 <annotation>
352 <documentation><![CDATA[
353 A template to generate the value automatically based on other <text> values of this preset.
354 For instance, "Bus {ref}: {from} → {to}" can be used to generate the name of a bus route relation.
355 ]]></documentation>
356 </annotation>
357 </attribute>
358
359 <attribute name="type" use="prohibited" />
360 <attribute name="name" use="prohibited" />
361 <attribute name="value" use="prohibited" />
362 <attribute name="values" use="prohibited" />
363 <anyAttribute processContents="skip" />
364 </complexType>
365
366 <complexType name="list_entry">
367 <annotation>
368 <documentation><![CDATA[
369 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.
370 ]]></documentation>
371 </annotation>
372 <attribute name="value" type="string" use="required" />
373 <attribute name="value_context" type="string" />
374 <attribute name="display_value" type="string" />
375 <attribute name="short_description" type="string">
376 <annotation>
377 <documentation><![CDATA[
378 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="" />
379 ]]></documentation>
380 </annotation>
381 </attribute>
382 <attributeGroup ref="tns:attributes.icon" />
383 <attributeGroup ref="tns:attributes.regions"/>
384 <anyAttribute processContents="skip" />
385 </complexType>
386
387 <complexType name="combo">
388 <annotation>
389 <documentation>
390 <p>
391 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.
392 </p>
393 <p>
394 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.
395 </p>
396 <p>
397 If the key is colour or colour:* or *:colour, a color preview and color picker is added on the right (see #8352).
398 </p>
399 </documentation>
400 </annotation>
401 <!-- use either list_entry's or a combination of values/display_values -->
402 <sequence>
403 <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
404 </sequence>
405 <attributeGroup ref="tns:attributes.key" />
406 <attributeGroup ref="tns:attributes.text" />
407 <attributeGroup ref="tns:attributes.icon" />
408 <attributeGroup ref="tns:attributes.values" />
409 <attribute name="use_last_as_default" type="tns:last_default" />
410 <attribute name="editable" type="boolean">
411 <annotation>
412 <documentation>
413 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.
414 </documentation>
415 </annotation>
416 </attribute>
417 <attribute name="match" type="tns:match" />
418 <attributeGroup ref="tns:attributes.length" />
419
420 <attribute name="type" use="prohibited" />
421 <attribute name="value" use="prohibited" />
422 <attribute name="name" use="prohibited" />
423 <attribute name="delete-if-empty" use="prohibited" />
424 <attribute name="display-values" use="prohibited" />
425 <anyAttribute processContents="skip" />
426 </complexType>
427
428 <complexType name="multiselect">
429 <!-- use either list_entry's or a combination of values/display_values -->
430 <sequence>
431 <group ref="tns:list_elements" minOccurs="0" maxOccurs="unbounded" />
432 </sequence>
433 <attributeGroup ref="tns:attributes.key" />
434 <attributeGroup ref="tns:attributes.text" />
435 <attributeGroup ref="tns:attributes.icon" />
436 <attributeGroup ref="tns:attributes.values" />
437 <attribute name="use_last_as_default" type="tns:last_default" />
438 <attribute name="match" type="tns:match" />
439
440 <attribute name="type" use="prohibited" />
441 <attribute name="value" use="prohibited" />
442 <attribute name="name" use="prohibited" />
443 <attribute name="delete-if-empty" use="prohibited" />
444 <attribute name="display-values" use="prohibited" />
445 <anyAttribute processContents="skip" />
446 </complexType>
447
448 <complexType name="checkgroup">
449 <annotation>
450 <documentation>
451 To group checks. The columns attribute is required.
452 </documentation>
453 </annotation>
454 <sequence>
455 <choice minOccurs="1" maxOccurs="unbounded">
456 <element name="check" type="tns:check" />
457 </choice>
458 </sequence>
459 <attribute name="columns" type="positiveInteger">
460 <annotation>
461 <documentation><![CDATA[
462 the number of columns of grouped <check />
463 ]]></documentation>
464 </annotation>
465 </attribute>
466 <anyAttribute processContents="skip" />
467 </complexType>
468
469 <complexType name="check">
470 <attributeGroup ref="tns:attributes.key" />
471 <attributeGroup ref="tns:attributes.text" />
472 <attribute name="value_on" type="string">
473 <annotation>
474 <documentation><![CDATA[
475 Specify the true value to be entered in the <key /> tag of a checked <check /> (default is "yes").
476 ]]></documentation>
477 </annotation>
478 </attribute>
479 <attribute name="value_off" type="string">
480 <annotation>
481 <documentation><![CDATA[
482 Specify the false value to be entered in the <key /> tag of a checked <check /> (default is "no").
483 ]]></documentation>
484 </annotation>
485 </attribute>
486 <attribute name="disable_off" type="boolean">
487 <annotation>
488 <documentation><![CDATA[
489 Whether the off value of a <check /> is disabled in the dialog, i.e., only unset or "yes" are provided.
490 ]]></documentation>
491 </annotation>
492 </attribute>
493 <attribute name="match" type="tns:match" />
494 <attributeGroup ref="tns:attributes.icon" />
495 <attributeGroup ref="tns:attributes.regions"/>
496
497 <attribute name="name" use="prohibited" />
498 <attribute name="type" use="prohibited" />
499 <attribute name="value" use="prohibited" />
500 <anyAttribute processContents="skip" />
501 </complexType>
502
503 <simpleType name="check_default">
504 <restriction base="string">
505 <enumeration value="on" />
506 <enumeration value="off" />
507 </restriction>
508 </simpleType>
509
510 <simpleType name="last_default">
511 <annotation>
512 <documentation><![CDATA[
513 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".
514 ]]></documentation>
515 </annotation>
516 <restriction base="string">
517 <enumeration value="true" />
518 <enumeration value="false" />
519 <enumeration value="force" />
520 </restriction>
521 </simpleType>
522
523 <simpleType name="match">
524 <annotation>
525 <documentation>
526 <p>
527 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.
528 </p>
529
530 <ul>
531 <li>none: neutral, i.e., do not consider this item for matching</li>
532 <li>key!: positive if key matches, negative otherwise</li>
533 <li>keyvalue: positive if key and value matches, neutral otherwise</li>
534 <li>keyvalue!: positive if key and value matches, negative otherwise</li>
535 </ul>
536
537 <p><![CDATA[
538 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 />.
539 ]]></p>
540 </documentation>
541 </annotation>
542 <restriction base="string">
543 <enumeration value="none" />
544 <enumeration value="key" />
545 <enumeration value="key!" />
546 <enumeration value="keyvalue" />
547 <enumeration value="keyvalue!" />
548 </restriction>
549 </simpleType>
550
551 <complexType name="roles">
552 <group ref="tns:roles_elements" maxOccurs="unbounded" />
553 </complexType>
554
555 <group name="roles_elements">
556 <choice>
557 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
558 <element name="reference" type="tns:reference" />
559 </choice>
560 </group>
561
562 <complexType name="role">
563 <annotation>
564 <documentation>
565 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.
566 </documentation>
567 </annotation>
568 <attribute name="key" type="string">
569 <annotation>
570 <documentation>
571 The role name used in a relation.
572 </documentation>
573 </annotation>
574 </attribute>
575 <attributeGroup ref="tns:attributes.text" />
576 <attribute name="requisite" type="tns:role_requisite" />
577 <attribute name="type" type="string" />
578 <attribute name="count" type="integer" />
579 <attribute name="member_expression" type="string" />
580 <attribute name="regexp" type="boolean" />
581 <attributeGroup ref="tns:attributes.regions"/>
582 <anyAttribute processContents="skip" />
583 </complexType>
584
585 <simpleType name="role_requisite">
586 <annotation>
587 <documentation>
588 If a relation member is optional or required. Default is "optional".
589 </documentation>
590 </annotation>
591 <restriction base="string">
592 <enumeration value="required" />
593 <enumeration value="optional" />
594 </restriction>
595 </simpleType>
596
597 <!-- Types and documentation for attributes -->
598
599 <attributeGroup name="attributes.name">
600 <attribute name="name" type="string" use="required">
601 <annotation>
602 <documentation>
603 Specify a name for an item. This name will be used in the GUI to display the tagging preset.
604 </documentation>
605 </annotation>
606 </attribute>
607 <attribute name="name_context" type="string">
608 <annotation>
609 <documentation>
610 Translation context for name attribute to separate equals words with different meaning (not required for in-file translations).
611 </documentation>
612 </annotation>
613 </attribute>
614 </attributeGroup>
615
616 <attributeGroup name="attributes.key">
617 <attribute name="key" type="string" use="required">
618 <annotation>
619 <documentation>
620 This specifies the property key that will be modified by the item.
621 </documentation>
622 </annotation>
623 </attribute>
624 <attribute name="default" type="string">
625 <annotation>
626 <documentation><![CDATA[
627 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 /<.
628 ]]></documentation>
629 </annotation>
630 </attribute>
631 </attributeGroup>
632
633 <attributeGroup name="attributes.text">
634 <attribute name="text" type="string">
635 <annotation>
636 <documentation><![CDATA[
637 The description, that will be displayed before (after in case of <check />) the gui element. Also used for <label> and <optional>.
638 ]]></documentation>
639 </annotation>
640 </attribute>
641 <attribute name="text_context" type="string">
642 <annotation>
643 <documentation>
644 Translation context for text attribute to separate equals words with different meaning (not required for in-file translations).
645 </documentation>
646 </annotation>
647 </attribute>
648 </attributeGroup>
649
650 <attributeGroup name="attributes.values">
651 <attribute name="values" type="string">
652 <annotation>
653 <documentation>
654 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.
655 </documentation>
656 </annotation>
657 </attribute>
658 <attribute name="values_from" type="string">
659 <annotation>
660 <documentation>
661 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".
662 </documentation>
663 </annotation>
664 </attribute>
665 <attribute name="values_context" type="string">
666 <annotation>
667 <documentation>
668 Translation context for values attribute to separate equals words with different meaning (not required for in-file translations).
669 </documentation>
670 </annotation>
671 </attribute>
672 <attribute name="values_no_i18n" type="boolean">
673 <annotation>
674 <documentation>
675 Disables internationalisation for value to avoid mistakes, see #11696. Default is "false". (Useful e.g. for opening hours or brand names.)
676 </documentation>
677 </annotation>
678 </attribute>
679 <attribute name="values_sort" type="boolean">
680 <annotation>
681 <documentation>
682 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 />
683 Users can globally disable sorting with the preference key taggingpreset.sortvalues.
684 </documentation>
685 </annotation>
686 </attribute>
687 <attribute name="display_values" type="string">
688 <annotation>
689 <documentation>
690 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.
691 </documentation>
692 </annotation>
693 </attribute>
694 <attribute name="values_searchable" type="boolean">
695 <annotation>
696 <documentation>
697 Whether to search in (display_)values when searching for presets.
698 </documentation>
699 </annotation>
700 </attribute>
701 <attribute name="delimiter" type="string">
702 <annotation>
703 <documentation><![CDATA[
704 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.
705 ]]></documentation>
706 </annotation>
707 </attribute>
708 </attributeGroup>
709
710 <attributeGroup name="attributes.icon">
711 <attribute name="icon" type="string">
712 <annotation>
713 <documentation><![CDATA[
714 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.
715 ]]></documentation>
716 </annotation>
717 </attribute>
718 <attribute name="icon_size" type="integer">
719 <annotation>
720 <documentation><![CDATA[
721 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>).
722 ]]></documentation>
723 </annotation>
724 </attribute>
725 </attributeGroup>
726
727 <attributeGroup name="attributes.length">
728 <attribute name="length" type="positiveInteger">
729 <annotation>
730 <documentation><![CDATA[
731 The length of a <text /> or <combo /> box (number of characters allowed).
732 ]]></documentation>
733 </annotation>
734 </attribute>
735 </attributeGroup>
736
737 <attributeGroup name="attributes.regions">
738 <attribute name="regions" type="string">
739 <annotation>
740 <documentation>
741 Comma separated list of countries this preset group or item is applicable for. If not specified, the preset is applicable for all countries.
742 </documentation>
743 </annotation>
744 </attribute>
745 <attribute name="exclude_regions" type="boolean">
746 <annotation>
747 <documentation>
748 If true, invert the meaning of regions.
749 </documentation>
750 </annotation>
751 </attribute>
752 </attributeGroup>
753
754</schema>
Note: See TracBrowser for help on using the repository browser.