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

Last change on this file since 3771 was 3741, checked in by bastiK, 13 years ago

update xml schema and doc for "short_description in combo"

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