| 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 | <complexContent>
|
|---|
| 24 | <extension base="tns:group-parent">
|
|---|
| 25 | <attribute name="author" type="string" />
|
|---|
| 26 | <attribute name="version" type="string" />
|
|---|
| 27 | <attribute name="shortdescription" type="string" />
|
|---|
| 28 | <attribute name="description" type="string" />
|
|---|
| 29 | <attribute name="link" type="string" />
|
|---|
| 30 |
|
|---|
| 31 | <anyAttribute processContents="skip" />
|
|---|
| 32 | </extension>
|
|---|
| 33 | </complexContent>
|
|---|
| 34 | </complexType>
|
|---|
| 35 |
|
|---|
| 36 | <complexType name="group-parent">
|
|---|
| 37 | <sequence>
|
|---|
| 38 | <choice minOccurs="1" maxOccurs="unbounded">
|
|---|
| 39 | <element name="chunk" type="tns:chunk"/>
|
|---|
| 40 | <element name="group" type="tns:group" />
|
|---|
| 41 | <element name="item" type="tns:item" />
|
|---|
| 42 | <element name="separator" type="tns:separator" />
|
|---|
| 43 | </choice>
|
|---|
| 44 | </sequence>
|
|---|
| 45 | <attribute name="icon" type="string" />
|
|---|
| 46 |
|
|---|
| 47 | <attribute name="type" use="prohibited" />
|
|---|
| 48 | <attribute name="text" use="prohibited" />
|
|---|
| 49 | <anyAttribute processContents="skip" />
|
|---|
| 50 | </complexType>
|
|---|
| 51 |
|
|---|
| 52 | <complexType name="group">
|
|---|
| 53 | <complexContent>
|
|---|
| 54 | <extension base="tns:group-parent">
|
|---|
| 55 | <attribute name="name" type="string" use="required" />
|
|---|
| 56 | </extension>
|
|---|
| 57 | </complexContent>
|
|---|
| 58 | </complexType>
|
|---|
| 59 |
|
|---|
| 60 | <complexType name="separator" />
|
|---|
| 61 |
|
|---|
| 62 | <complexType name="item">
|
|---|
| 63 | <sequence>
|
|---|
| 64 | <choice minOccurs="0" maxOccurs="unbounded">
|
|---|
| 65 | <group ref="tns:optional_elements" />
|
|---|
| 66 | <element name="key" type="tns:key" />
|
|---|
| 67 | <element name="optional" type="tns:optional" minOccurs="0" />
|
|---|
| 68 | </choice>
|
|---|
| 69 | <element name="roles" type="tns:roles" minOccurs="0" maxOccurs="1" />
|
|---|
| 70 | </sequence>
|
|---|
| 71 | <attribute name="name" type="string" use="required" />
|
|---|
| 72 | <attribute name="icon" type="string" />
|
|---|
| 73 | <attribute name="type" type="string" />
|
|---|
| 74 | <attribute name="name_template" type="string"/>
|
|---|
| 75 | <attribute name="name_template_filter" type="string"/>
|
|---|
| 76 | <attribute name="preset_name_label" type="boolean"/>
|
|---|
| 77 |
|
|---|
| 78 | <attribute name="text" use="prohibited" />
|
|---|
| 79 | <anyAttribute processContents="skip" />
|
|---|
| 80 | </complexType>
|
|---|
| 81 |
|
|---|
| 82 | <complexType name="optional">
|
|---|
| 83 | <group ref="tns:optional_elements" maxOccurs="unbounded" />
|
|---|
| 84 | <attribute name="text" type="string" />
|
|---|
| 85 | <attribute name="text_context" type="string" />
|
|---|
| 86 | </complexType>
|
|---|
| 87 |
|
|---|
| 88 | <complexType name="chunk">
|
|---|
| 89 | <sequence>
|
|---|
| 90 | <choice minOccurs="1" maxOccurs="unbounded">
|
|---|
| 91 | <group ref="tns:optional_elements" />
|
|---|
| 92 | <element name="key" type="tns:key" />
|
|---|
| 93 | <element name="optional" type="tns:optional" minOccurs="0" />
|
|---|
| 94 | </choice>
|
|---|
| 95 | </sequence>
|
|---|
| 96 | <attribute name="id" type="ID" use="required" />
|
|---|
| 97 | </complexType>
|
|---|
| 98 |
|
|---|
| 99 | <complexType name="reference">
|
|---|
| 100 | <attribute name="ref" type="IDREF" use="required" />
|
|---|
| 101 | </complexType>
|
|---|
| 102 |
|
|---|
| 103 | <group name="optional_elements">
|
|---|
| 104 | <choice>
|
|---|
| 105 | <element name="label" type="tns:label" />
|
|---|
| 106 | <element name="space" type="tns:space" />
|
|---|
| 107 | <element name="link" type="tns:link" />
|
|---|
| 108 | <element name="preset_link" type="tns:preset_link" />
|
|---|
| 109 | <element name="text" type="tns:text" />
|
|---|
| 110 | <element name="combo" type="tns:combo" />
|
|---|
| 111 | <element name="multiselect" type="tns:multiselect" />
|
|---|
| 112 | <element name="checkgroup" type="tns:checkgroup" />
|
|---|
| 113 | <element name="check" type="tns:check" />
|
|---|
| 114 | <element name="item_separator" type="tns:separator" />
|
|---|
| 115 | <element name="reference" type="tns:reference" />
|
|---|
| 116 | </choice>
|
|---|
| 117 | </group>
|
|---|
| 118 |
|
|---|
| 119 | <complexType name="key">
|
|---|
| 120 | <attribute name="key" type="string" use="required" />
|
|---|
| 121 | <attribute name="value" type="string" />
|
|---|
| 122 | <attribute name="match" type="string" />
|
|---|
| 123 | </complexType>
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 | <complexType name="link">
|
|---|
| 127 | <attribute name="href" type="string" use="required" />
|
|---|
| 128 | <attribute name="text" type="string" />
|
|---|
| 129 | <attribute name="text_context" type="string" />
|
|---|
| 130 |
|
|---|
| 131 | <attribute name="name" use="prohibited" />
|
|---|
| 132 | <anyAttribute processContents="skip" />
|
|---|
| 133 | </complexType>
|
|---|
| 134 |
|
|---|
| 135 | <complexType name="preset_link">
|
|---|
| 136 | <attribute name="preset_name" type="string" use="required" />
|
|---|
| 137 | <attribute name="name" use="prohibited" />
|
|---|
| 138 | </complexType>
|
|---|
| 139 |
|
|---|
| 140 | <complexType name="label">
|
|---|
| 141 | <attribute name="text" type="string" use="required" />
|
|---|
| 142 | <attribute name="text_context" type="string" />
|
|---|
| 143 |
|
|---|
| 144 | <attribute name="name" use="prohibited" />
|
|---|
| 145 | <anyAttribute processContents="skip" />
|
|---|
| 146 | </complexType>
|
|---|
| 147 |
|
|---|
| 148 | <complexType name="space" />
|
|---|
| 149 |
|
|---|
| 150 | <complexType name="text">
|
|---|
| 151 | <attribute name="key" type="string" use="required" />
|
|---|
| 152 | <attribute name="text" type="string" />
|
|---|
| 153 | <attribute name="text_context" type="string" />
|
|---|
| 154 | <attribute name="default" type="string" />
|
|---|
| 155 | <attribute name="use_last_as_default" type="tns:last_default" />
|
|---|
| 156 | <attribute name="auto_increment" type="string" />
|
|---|
| 157 | <attribute name="match" type="tns:match" />
|
|---|
| 158 | <attribute name="length" type="positiveInteger" />
|
|---|
| 159 |
|
|---|
| 160 | <attribute name="type" use="prohibited" />
|
|---|
| 161 | <attribute name="name" use="prohibited" />
|
|---|
| 162 | <attribute name="value" use="prohibited" />
|
|---|
| 163 | <attribute name="values" use="prohibited" />
|
|---|
| 164 | <anyAttribute processContents="skip" />
|
|---|
| 165 | </complexType>
|
|---|
| 166 |
|
|---|
| 167 | <complexType name="list_entry">
|
|---|
| 168 | <attribute name="value" type="string" use="required" />
|
|---|
| 169 | <attribute name="value_context" type="string" />
|
|---|
| 170 | <attribute name="display_value" type="string" />
|
|---|
| 171 | <attribute name="short_description" type="string" />
|
|---|
| 172 | <attribute name="icon" type="string" />
|
|---|
| 173 | <attribute name="icon_size" type="integer" />
|
|---|
| 174 | <anyAttribute processContents="skip" />
|
|---|
| 175 | </complexType>
|
|---|
| 176 |
|
|---|
| 177 | <complexType name="combo">
|
|---|
| 178 | <!-- use either list_entry's or a combination of values/display_values -->
|
|---|
| 179 | <sequence>
|
|---|
| 180 | <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
|
|---|
| 181 | </sequence>
|
|---|
| 182 | <attribute name="key" type="string" use="required" />
|
|---|
| 183 | <attribute name="text" type="string" />
|
|---|
| 184 | <attribute name="text_context" type="string" />
|
|---|
| 185 | <attribute name="values" type="string" />
|
|---|
| 186 | <attribute name="values_from" type="string" />
|
|---|
| 187 | <attribute name="values_context" type="string" />
|
|---|
| 188 | <attribute name="display_values" type="string" />
|
|---|
| 189 | <attribute name="values_searchable" type="boolean" />
|
|---|
| 190 | <attribute name="default" type="string" />
|
|---|
| 191 | <attribute name="use_last_as_default" type="tns:last_default" />
|
|---|
| 192 | <attribute name="delimiter" type="string" />
|
|---|
| 193 | <attribute name="editable" type="boolean" />
|
|---|
| 194 | <attribute name="match" type="tns:match" />
|
|---|
| 195 | <attribute name="length" type="positiveInteger" />
|
|---|
| 196 |
|
|---|
| 197 | <attribute name="type" use="prohibited" />
|
|---|
| 198 | <attribute name="value" use="prohibited" />
|
|---|
| 199 | <attribute name="name" use="prohibited" />
|
|---|
| 200 | <attribute name="delete-if-empty" use="prohibited" />
|
|---|
| 201 | <attribute name="display-values" use="prohibited" />
|
|---|
| 202 | <anyAttribute processContents="skip" />
|
|---|
| 203 | </complexType>
|
|---|
| 204 |
|
|---|
| 205 | <complexType name="multiselect">
|
|---|
| 206 | <!-- use either list_entry's or a combination of values/display_values -->
|
|---|
| 207 | <sequence>
|
|---|
| 208 | <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
|
|---|
| 209 | </sequence>
|
|---|
| 210 | <attribute name="key" type="string" use="required" />
|
|---|
| 211 | <attribute name="text" type="string" />
|
|---|
| 212 | <attribute name="text_context" type="string" />
|
|---|
| 213 | <attribute name="values" type="string" />
|
|---|
| 214 | <attribute name="values_from" type="string" />
|
|---|
| 215 | <attribute name="values_context" type="string" />
|
|---|
| 216 | <attribute name="display_values" type="string" />
|
|---|
| 217 | <attribute name="values_searchable" type="boolean" />
|
|---|
| 218 | <attribute name="default" type="string" />
|
|---|
| 219 | <attribute name="use_last_as_default" type="tns:last_default" />
|
|---|
| 220 | <attribute name="delimiter" type="string" />
|
|---|
| 221 | <attribute name="match" type="tns:match" />
|
|---|
| 222 |
|
|---|
| 223 | <attribute name="type" use="prohibited" />
|
|---|
| 224 | <attribute name="value" use="prohibited" />
|
|---|
| 225 | <attribute name="name" use="prohibited" />
|
|---|
| 226 | <attribute name="delete-if-empty" use="prohibited" />
|
|---|
| 227 | <attribute name="display-values" use="prohibited" />
|
|---|
| 228 | <anyAttribute processContents="skip" />
|
|---|
| 229 | </complexType>
|
|---|
| 230 |
|
|---|
| 231 | <complexType name="checkgroup">
|
|---|
| 232 | <sequence>
|
|---|
| 233 | <choice minOccurs="1" maxOccurs="unbounded">
|
|---|
| 234 | <element name="check" type="tns:check" />
|
|---|
| 235 | </choice>
|
|---|
| 236 | </sequence>
|
|---|
| 237 | <attribute name="columns" type="positiveInteger" />
|
|---|
| 238 | <anyAttribute processContents="skip" />
|
|---|
| 239 | </complexType>
|
|---|
| 240 |
|
|---|
| 241 | <complexType name="check">
|
|---|
| 242 | <attribute name="key" type="string" use="required" />
|
|---|
| 243 | <attribute name="text" type="string" />
|
|---|
| 244 | <attribute name="text_context" type="string" />
|
|---|
| 245 | <attribute name="default" type="tns:check_default" />
|
|---|
| 246 | <attribute name="value_on" type="string" />
|
|---|
| 247 | <attribute name="value_off" type="string" />
|
|---|
| 248 | <attribute name="match" type="tns:match" />
|
|---|
| 249 |
|
|---|
| 250 | <attribute name="name" use="prohibited" />
|
|---|
| 251 | <attribute name="type" use="prohibited" />
|
|---|
| 252 | <attribute name="value" use="prohibited" />
|
|---|
| 253 | <anyAttribute processContents="skip" />
|
|---|
| 254 | </complexType>
|
|---|
| 255 |
|
|---|
| 256 | <simpleType name="check_default">
|
|---|
| 257 | <restriction base="string">
|
|---|
| 258 | <enumeration value="on" />
|
|---|
| 259 | <enumeration value="off" />
|
|---|
| 260 | </restriction>
|
|---|
| 261 | </simpleType>
|
|---|
| 262 |
|
|---|
| 263 | <simpleType name="last_default">
|
|---|
| 264 | <restriction base="string">
|
|---|
| 265 | <enumeration value="true" />
|
|---|
| 266 | <enumeration value="false" />
|
|---|
| 267 | <enumeration value="force" />
|
|---|
| 268 | </restriction>
|
|---|
| 269 | </simpleType>
|
|---|
| 270 |
|
|---|
| 271 | <simpleType name="match">
|
|---|
| 272 | <restriction base="string">
|
|---|
| 273 | <enumeration value="none" />
|
|---|
| 274 | <enumeration value="key" />
|
|---|
| 275 | <enumeration value="key!" />
|
|---|
| 276 | <enumeration value="keyvalue" />
|
|---|
| 277 | </restriction>
|
|---|
| 278 | </simpleType>
|
|---|
| 279 |
|
|---|
| 280 | <complexType name="roles">
|
|---|
| 281 | <sequence>
|
|---|
| 282 | <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
|
|---|
| 283 | </sequence>
|
|---|
| 284 | </complexType>
|
|---|
| 285 |
|
|---|
| 286 | <complexType name="role">
|
|---|
| 287 | <attribute name="key" type="string" />
|
|---|
| 288 | <attribute name="text" type="string" />
|
|---|
| 289 | <attribute name="text_context" type="string" />
|
|---|
| 290 | <attribute name="requisite" type="tns:role_requisite" />
|
|---|
| 291 | <attribute name="type" type="string" />
|
|---|
| 292 | <attribute name="count" type="integer" />
|
|---|
| 293 | <attribute name="member_expression" type="string" />
|
|---|
| 294 | <anyAttribute processContents="skip" />
|
|---|
| 295 | </complexType>
|
|---|
| 296 |
|
|---|
| 297 | <simpleType name="role_requisite">
|
|---|
| 298 | <restriction base="string">
|
|---|
| 299 | <enumeration value="required" />
|
|---|
| 300 | <enumeration value="optional" />
|
|---|
| 301 | </restriction>
|
|---|
| 302 | </simpleType>
|
|---|
| 303 |
|
|---|
| 304 | </schema>
|
|---|