-
Notifications
You must be signed in to change notification settings - Fork 9
/
iati-common.xsd
296 lines (273 loc) · 11.8 KB
/
iati-common.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.03">
<xsd:annotation>
<xsd:documentation xml:lang="en">
International Aid Transparency Initiative: Common Markup Components
Release 2.03, 2018-02-19
This schema is not meant to be used on its own: it contains
common shared markup components for the IATI activities and
organisations schemas. It must be in the same directory as
iati-activities-schema.xsd and iati-organisations-schema.xsd
(together with xml.xsd).
</xsd:documentation>
</xsd:annotation>
<!-- for xml:lang -->
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>
<!--
Common elements.
-->
<xsd:element name="narrative">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The free text name or description of the item being described. This can
be repeated in multiple languages.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute ref="xml:lang" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A code specifying the language of text in this element. It is recommended that wherever possible only codes from ISO 639-1 are used. If not present, the default language is assumed.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="title" type="textRequiredType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A short, human-readable title.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="description" type="descriptionBase">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A longer, human-readable description.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="comment" type="textRequiredType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A human-readable comment associated with a piece of aid information.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="reporting-org">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The organisation issuing the report.
May be a primary source (reporting on its own activity as
donor, implementing agency, etc) or a secondary source
(reporting on the activities of another organisation).
Specifying the @ref attribute is mandatory.
May contain the organisation name as content.
All activities in an activity xml file must contain the same
@ref AND this @ref must be the same as the iati-identifier
recorded in the registry publisher record of the account under
which this file is published.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="narrative" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The name of the organisation. May be repeated for
different languages.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="ref" use="required" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Machine-readable identification string for the organisation issuing the report. Must be in the format {RegistrationAgency}-{RegistrationNumber} where {RegistrationAgency} is a valid code in the Organisation Registration Agency code list and {RegistrationNumber} is a valid identifier issued by the {RegistrationAgency}.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="type" use="required" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The type of organisation issuing the report. See IATI codelist for values.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="secondary-reporter" type="xsd:boolean" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A flag indicating that the reporting organisation of this activity is acting as a secondary reporter. A secondary reporter is one that reproduces data on the activities of an organisation for which it is not directly responsible. This does not include a publisher officially assigned as a proxy to report on behalf of another.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<!--
Frequently-used attributes.
-->
<xsd:attribute name="value-date" type="xsd:date">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The date to be used for determining the exchange rate for
currency conversions.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<!--
Common attribute groups and data types used by the elements above.
-->
<xsd:complexType name="descriptionBase">
<xsd:sequence>
<xsd:element ref="narrative" minOccurs="1" maxOccurs="unbounded" />
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
<xsd:complexType name="textType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Data type for an element that may contain human-readable text
in different languages.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="narrative" minOccurs="0" maxOccurs="unbounded" />
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
<xsd:complexType name="textRequiredType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Data type for an element that must contain human-readable text.
The information may be repeated in different languages.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="narrative" minOccurs="1" maxOccurs="unbounded" />
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
<!-- documentLinkBase provides the common elements and attributes for the document-link elements in iati-activities and iati-organisations. -->
<xsd:complexType name="documentLinkBase">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A link to an online, publicly accessible web page or document.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element ref="title" minOccurs="1" maxOccurs="1"/>
<xsd:element name="description" minOccurs="0" maxOccurs="1" type="descriptionBase">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A description of the document contents, or guidance on where to access the relevant information in the document.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="category" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation xml:lang="en">
IATI Document Category Code
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" use="required" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
An IATI code defining the category of the document.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="language" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The ISO 639-1 language code in which target document is written, e.g. "en". Can be repeated to describe multi-lingual documents.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" use="required" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
ISO 639-1 language code
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="document-date" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The date of publication of the document that is being linked to.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="iso-date" use="required" type="xsd:date"/>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
</xsd:element>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="url" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
The target URL of the external document, e.g. "http://www.example.org/doc.odt".
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="format" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">
An IANA code for the MIME type of the document being referenced, e.g. "application/pdf".
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:complexType>
<xsd:complexType name="currencyType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Data type for an element containing a currency value.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:decimal">
<xsd:attribute ref="currency" use="optional"/>
<xsd:attribute ref="value-date" use="required"/>
<xsd:anyAttribute processContents="lax" namespace="##other"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:attribute name="currency" type="xsd:string">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A three letter ISO 4217 code for the original currency of the
amount. This is required for all currency amounts unless
the iati-organisation/\@default-currency attribute is
specified.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:schema>