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

Last change on this file since 3798 was 3793, checked in by framm, 13 years ago

add multiselect docs to defaultpresets

  • Property svn:mime-type set to text/plain
File size: 6.9 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" elementFormDefault="qualified">
4
5 <!--
6 Localized attributes (for example de.description are not supported by
7 xsd, so every element needs <anyAttribute/>
8 To cover at least some common errors, elements have specified prohibited attributes
9 -->
10
11 <element name="annotations" type="tns:root"/>
12 <element name="presets" type="tns:root"/>
13
14 <complexType name="root">
15 <complexContent>
16 <extension base="tns:group">
17 <attribute name="author" type="string" />
18 <attribute name="version" type="string" />
19 <attribute name="shortdescription" type="string" />
20 <attribute name="description" type="string" />
21 <attribute name="link" type="string"/>
22
23 <anyAttribute processContents="skip"/>
24 </extension>
25 </complexContent>
26 </complexType>
27
28 <complexType name="group">
29 <sequence>
30 <choice minOccurs="1" maxOccurs="unbounded">
31 <element name="group" type="tns:group" />
32 <element name="item" type="tns:item" />
33 <element name="separator" type="tns:separator" />
34 </choice>
35 </sequence>
36 <attribute name="name" type="string" />
37 <attribute name="icon" type="string" />
38
39 <attribute name="type" use="prohibited"/>
40 <attribute name="text" use="prohibited"/>
41 <anyAttribute processContents="skip"/>
42 </complexType>
43
44 <complexType name="separator" />
45
46 <complexType name="item">
47 <sequence>
48 <choice minOccurs="0" maxOccurs="unbounded">
49 <group ref="tns:optional_elements" />
50 <element name="key" type="tns:key" />
51 <element name="optional" type="tns:optional" minOccurs="0" />
52 </choice>
53 <element name="roles" type="tns:roles" minOccurs="0" />
54 </sequence>
55 <attribute name="name" type="string" />
56 <attribute name="icon" type="string" />
57 <attribute name="type" type="string" />
58
59 <attribute name="text" use="prohibited"/>
60 <anyAttribute processContents="skip"/>
61 </complexType>
62
63 <complexType name="optional">
64 <group ref="tns:optional_elements" maxOccurs="unbounded" />
65 </complexType>
66
67 <group name="optional_elements">
68 <choice>
69 <element name="label" type="tns:label" />
70 <element name="space" type="tns:space" />
71 <element name="link" type="tns:link" />
72 <element name="text" type="tns:text" />
73 <element name="combo" type="tns:combo" />
74 <element name="multiselect" type="tns:multiselect" />
75 <element name="check" type="tns:check" />
76 </choice>
77 </group>
78
79 <complexType name="key">
80 <attribute name="key" type="string" use="required"/>
81 <attribute name="value" type="string"/>
82 </complexType>
83
84
85 <complexType name="link">
86 <attribute name="href" type="string" use="required" />
87 <attribute name="text" type="string" />
88 <attribute name="text_context" type="string" />
89
90 <attribute name="name" use="prohibited"/>
91 <anyAttribute processContents="skip"/>
92 </complexType>
93
94 <complexType name="label">
95 <attribute name="text" type="string" use="required" />
96 <attribute name="text_context" type="string" />
97
98 <attribute name="name" use="prohibited"/>
99 <anyAttribute processContents="skip"/>
100 </complexType>
101
102 <complexType name="space" />
103
104 <complexType name="text">
105 <attribute name="key" type="string" use="required"/>
106 <attribute name="text" type="string" />
107 <attribute name="text_context" type="string" />
108 <attribute name="default" type="string" />
109 <attribute name="delete_if_empty" type="boolean" />
110 <attribute name="use_last_as_default" type="boolean" />
111 <attribute name="required" type="boolean"/>
112
113 <attribute name="type" use="prohibited"/>
114 <attribute name="name" use="prohibited"/>
115 <attribute name="value" use="prohibited"/>
116 <attribute name="values" use="prohibited"/>
117 <anyAttribute processContents="skip"/>
118 </complexType>
119
120 <complexType name="combo">
121 <sequence>
122 <element name="short_description" type="string" minOccurs="0" maxOccurs="unbounded"/>
123 </sequence>
124 <attribute name="key" type="string" use="required" />
125 <attribute name="text" type="string" />
126 <attribute name="text_context" type="string" />
127 <attribute name="values" type="string" use="required" />
128 <attribute name="values_context" type="string" />
129 <attribute name="display_values" type="string"/>
130 <attribute name="default" type="string" />
131 <attribute name="editable" type="boolean" />
132 <attribute name="delete_if_empty" type="boolean" />
133 <attribute name="required" type="boolean"/>
134
135 <attribute name="type" use="prohibited"/>
136 <attribute name="value" use="prohibited"/>
137 <attribute name="name" use="prohibited"/>
138 <attribute name="delete-if-empty" use="prohibited"/>
139 <attribute name="display-values" use="prohibited"/>
140 <anyAttribute processContents="skip"/>
141 </complexType>
142
143 <complexType name="multiselect">
144 <attribute name="key" type="string" use="required" />
145 <attribute name="text" type="string" />
146 <attribute name="text_context" type="string" />
147 <attribute name="values" type="string" use="required" />
148 <attribute name="values_context" type="string" />
149 <attribute name="display_values" type="string"/>
150 <attribute name="default" type="string" />
151 <attribute name="delimiter" type="string" />
152 <attribute name="delete_if_empty" type="boolean" />
153 <attribute name="required" type="boolean"/>
154
155 <attribute name="type" use="prohibited"/>
156 <attribute name="value" use="prohibited"/>
157 <attribute name="name" use="prohibited"/>
158 <attribute name="delete-if-empty" use="prohibited"/>
159 <attribute name="display-values" use="prohibited"/>
160 <anyAttribute processContents="skip"/>
161 </complexType>
162
163 <complexType name="check">
164 <attribute name="key" type="string" use="required" />
165 <attribute name="text" type="string" />
166 <attribute name="text_context" type="string" />
167 <attribute name="default" type="tns:check_default" />
168 <attribute name="use_last_as_default" type="boolean" />
169 <attribute name="required" type="boolean"/>
170 <attribute name="value_on" type="string"/>
171 <attribute name="value_off" type="string"/>
172
173 <attribute name="name" use="prohibited"/>
174 <attribute name="type" use="prohibited"/>
175 <attribute name="value" use="prohibited"/>
176 <anyAttribute processContents="skip"/>
177 </complexType>
178
179 <simpleType name="check_default">
180 <restriction base="string">
181 <enumeration value="on" />
182 <enumeration value="off" />
183 </restriction>
184 </simpleType>
185
186 <complexType name="roles">
187 <sequence>
188 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded"/>
189 </sequence>
190 </complexType>
191
192 <complexType name="role">
193 <attribute name="key" type="string"/>
194 <attribute name="text" type="string"/>
195 <attribute name="text_context" type="string"/>
196 <attribute name="requisite" type="tns:role_requisite"/>
197 <attribute name="type" type="string"/>
198 <attribute name="count" type="integer"/>
199 <attribute name="required" type="boolean"/>
200 </complexType>
201
202 <simpleType name="role_requisite">
203 <restriction base="string">
204 <enumeration value="required"/>
205 <enumeration value="optional"/>
206 </restriction>
207 </simpleType>
208
209</schema>
Note: See TracBrowser for help on using the repository browser.