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

Last change on this file since 3538 was 3533, checked in by stoecker, 14 years ago

see #5436 - move xsd to proper place

  • Property svn:mime-type set to text/plain
File size: 5.5 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="check" type="tns:check" />
75 </choice>
76 </group>
77
78 <complexType name="key">
79 <attribute name="key" type="string" use="required"/>
80 <attribute name="value" type="string"/>
81 </complexType>
82
83
84 <complexType name="link">
85 <attribute name="href" type="string" use="required" />
86 <attribute name="text" type="string" />
87
88 <attribute name="name" use="prohibited"/>
89 <anyAttribute processContents="skip"/>
90 </complexType>
91
92 <complexType name="label">
93 <attribute name="text" type="string" use="required" />
94
95 <attribute name="name" use="prohibited"/>
96 <anyAttribute processContents="skip"/>
97 </complexType>
98
99 <complexType name="space" />
100
101 <complexType name="text">
102 <attribute name="key" type="string" use="required"/>
103 <attribute name="text" type="string" />
104 <attribute name="default" type="string" />
105 <attribute name="delete_if_empty" type="boolean" />
106 <attribute name="use_last_as_default" type="boolean" />
107 <attribute name="required" type="boolean"/>
108
109 <attribute name="type" use="prohibited"/>
110 <attribute name="name" use="prohibited"/>
111 <attribute name="value" use="prohibited"/>
112 <attribute name="values" use="prohibited"/>
113 <anyAttribute processContents="skip"/>
114 </complexType>
115
116 <complexType name="combo">
117 <attribute name="key" type="string" use="required" />
118 <attribute name="text" type="string" />
119 <attribute name="values" type="string" use="required" />
120 <attribute name="default" type="string" />
121 <attribute name="editable" type="boolean" />
122 <attribute name="delete_if_empty" type="boolean" />
123 <attribute name="display_values" type="string"/>
124 <attribute name="required" type="boolean"/>
125
126 <attribute name="type" use="prohibited"/>
127 <attribute name="value" use="prohibited"/>
128 <attribute name="name" use="prohibited"/>
129 <attribute name="delete-if-empty" use="prohibited"/>
130 <attribute name="display-values" use="prohibited"/>
131 <anyAttribute processContents="skip"/>
132 </complexType>
133
134 <complexType name="check">
135 <attribute name="key" type="string" use="required" />
136 <attribute name="text" type="string" />
137 <attribute name="default" type="tns:check_default" />
138 <attribute name="delete_if_empty" type="boolean" />
139 <attribute name="use_last_as_default" type="boolean" />
140 <attribute name="required" type="boolean"/>
141
142 <attribute name="name" use="prohibited"/>
143 <attribute name="type" use="prohibited"/>
144 <attribute name="value" use="prohibited"/>
145 <anyAttribute processContents="skip"/>
146 </complexType>
147
148 <simpleType name="check_default">
149 <restriction base="string">
150 <enumeration value="on" />
151 <enumeration value="off" />
152 </restriction>
153 </simpleType>
154
155 <complexType name="roles">
156 <sequence>
157 <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded"/>
158 </sequence>
159 </complexType>
160
161 <complexType name="role">
162 <attribute name="key" type="string"/>
163 <attribute name="text" type="string"/>
164 <attribute name="requisite" type="string"/>
165 <attribute name="type" type="string"/>
166 <attribute name="count" type="integer"/>
167 </complexType>
168
169 <simpleType name="role_requisite">
170 <restriction base="string">
171 <enumeration value="required"/>
172 <enumeration value="optional"/>
173 </restriction>
174 </simpleType>
175
176</schema>
Note: See TracBrowser for help on using the repository browser.