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

Last change on this file was 17662, checked in by simon04, 3 weeks ago

fix #19012 - Tagging presets: additional matching criteria via <item match_expression="...">

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