-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom_feed.xsd
287 lines (287 loc) · 12.8 KB
/
atom_feed.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
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2005/Atom" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation>
This version of the Atom schema is based on version 1.0 of the format specifications,
found here http://www.atomenabled.org/developers/syndication/atom-format-spec.php.
The original namespace was http://www.w3.org/2005/Atom but we changed it to http://www.opengis.net/atom/2005
to avoid conflicting definitions of the same namespace in the future. NOT DONE YET.
There is no XSD official schema for atom but this one seems to be the most known:
http://www.kbcafe.com/rss/atom.xsd.xml
(The Atom Publishing Protocol was issued as a Proposed Standard in IETF RFC 5023
in October 2007 http://tools.ietf.org/html/rfc5023)
</xs:documentation>
</xs:annotation>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
<xs:annotation>
<xs:documentation>
An Atom document may have two root elements, feed and entry, as defined in section 2.
</xs:documentation>
</xs:annotation>
<xs:element name="feed" type="atom:feedType"/>
<xs:element name="entry" type="atom:entryType"/>
<xs:simpleType name="textTypeType">
<xs:restriction base="xs:token">
<xs:enumeration value="text"/>
<xs:enumeration value="html"/>
<xs:enumeration value="xhtml"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="MimeType">
<xs:annotation>
<xs:documentation>XML encoded identifier of a standard MIME type, possibly
a parameterized MIME type. Copied from ows 2.0.1</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="(application|audio|image|text|video|message|multipart|model)/.+(;\s*.+=.+)*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ContentTypeType">
<xs:union memberTypes="atom:textTypeType atom:MimeType"/>
</xs:simpleType>
<xs:complexType name="textType" mixed="true">
<xs:annotation>
<xs:documentation>
The Atom text construct is defined in section 3.1 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="http://www.w3.org/1999/xhtml" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" type="atom:textTypeType"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="personType">
<xs:annotation>
<xs:documentation>
The Atom person construct is defined in section 3.2 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:choice maxOccurs="unbounded">
<xs:element name="name" type="xs:string"/>
<xs:element name="uri" type="atom:uriType" minOccurs="0"/>
<xs:element name="email" type="atom:emailType" minOccurs="0"/>
<xs:any namespace="##other"/>
</xs:choice>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:simpleType name="emailType">
<xs:annotation>
<xs:documentation>
Schema definition for an email address.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString">
<xs:pattern value="(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="feedType">
<xs:annotation>
<xs:documentation>
The Atom feed construct is defined in section 4.1.1 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="3" maxOccurs="unbounded">
<xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="generator" type="atom:generatorType" minOccurs="0"/>
<xs:element name="icon" type="atom:iconType" minOccurs="0"/>
<xs:element name="id" type="atom:idType"/>
<xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="logo" type="atom:logoType" minOccurs="0"/>
<xs:element name="rights" type="atom:textType" minOccurs="0"/>
<xs:element name="subtitle" type="atom:textType" minOccurs="0"/>
<xs:element name="title" type="atom:textType"/>
<xs:element name="updated" type="atom:dateTimeType"/>
<xs:element name="entry" type="atom:entryType" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="entryType">
<xs:annotation>
<xs:documentation>
The Atom entry construct is defined in section 4.1.2 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:choice maxOccurs="unbounded">
<xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="content" type="atom:contentType" minOccurs="0"/>
<xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="id" type="atom:idType"/>
<xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="published" type="atom:dateTimeType" minOccurs="0"/>
<xs:element name="rights" type="atom:textType" minOccurs="0"/>
<xs:element name="source" type="atom:sourceType" minOccurs="0"/>
<xs:element name="summary" type="atom:textType" minOccurs="0"/>
<xs:element name="title" type="atom:textType"/>
<xs:element name="updated" type="atom:dateTimeType"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="contentType" mixed="true">
<xs:annotation>
<xs:documentation>
The Atom content construct is defined in section 4.1.3 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" type="atom:ContentTypeType"/>
<xs:attribute name="src" type="xs:anyURI"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="categoryType">
<xs:annotation>
<xs:documentation>
The Atom cagegory construct is defined in section 4.2.2 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:attribute name="term" type="xs:string" use="required"/>
<xs:attribute name="scheme" type="xs:anyURI" use="optional"/>
<xs:attribute name="label" type="xs:string" use="optional"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="generatorType">
<xs:annotation>
<xs:documentation>
The Atom generator element is defined in section 4.2.4 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="uri" type="xs:anyURI" use="optional"/>
<xs:attribute name="version" type="xs:string" use="optional"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="iconType">
<xs:annotation>
<xs:documentation>
The Atom icon construct is defined in section 4.2.5 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="idType">
<xs:annotation>
<xs:documentation>
The Atom id construct is defined in section 4.2.6 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="KnownRelCodeType">
<xs:restriction base="xs:string">
<xs:enumeration value="alternate">
<xs:annotation>
<xs:documentation>The value "alternate" signifies that the IRI in the value of the href attribute identifies an alternate version of the resource described by the containing element.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="related">
<xs:annotation>
<xs:documentation>The value "related" signifies that the IRI in the value of the href attribute identifies a resource related to the resource described by the containing element. For example, the feed for a site that discusses the performance of the search engine at "http://search.example.com" might contain, as a child of atom:feed. An identical link might appear as a child of any atom:entry whose content contains a discussion of that same search engine.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="self">
<xs:annotation>
<xs:documentation>The value "self" signifies that the IRI in the value of the href attribute identifies a resource equivalent to the containing element.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="enclosure">
<xs:annotation>
<xs:documentation>The value "enclosure" signifies that the IRI in the value of the href attribute identifies a related resource that is potentially large in size and might require special handling. For atom:link elements with rel="enclosure", the length attribute SHOULD be provided.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="via">
<xs:annotation>
<xs:documentation>The value "via" signifies that the IRI in the value of the href attribute identifies a resource that is the source of the information provided in the containing element.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RelCodeType">
<xs:union memberTypes="atom:KnownRelCodeType xs:string"/>
</xs:simpleType>
<xs:complexType name="linkType" mixed="true">
<xs:annotation>
<xs:documentation>
The Atom link construct is defined in section 3.4 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:attribute name="href" type="xs:anyURI" use="required"/>
<xs:attribute name="rel" type="atom:RelCodeType" use="optional"/>
<xs:attribute name="type" type="xs:string" use="optional"/>
<xs:attribute name="hreflang" type="xs:NMTOKEN" use="optional"/>
<xs:attribute name="title" type="xs:string" use="optional"/>
<xs:attribute name="length" type="xs:positiveInteger" use="optional"/>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="logoType">
<xs:annotation>
<xs:documentation>
The Atom logo construct is defined in section 4.2.8 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="sourceType">
<xs:annotation>
<xs:documentation>
The Atom source construct is defined in section 4.2.11 of the format spec.
</xs:documentation>
</xs:annotation>
<xs:choice maxOccurs="unbounded">
<xs:element name="author" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="category" type="atom:categoryType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="contributor" type="atom:personType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="generator" type="atom:generatorType" minOccurs="0"/>
<xs:element name="icon" type="atom:iconType" minOccurs="0"/>
<xs:element name="id" type="atom:idType" minOccurs="0"/>
<xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="logo" type="atom:logoType" minOccurs="0"/>
<xs:element name="rights" type="atom:textType" minOccurs="0"/>
<xs:element name="subtitle" type="atom:textType" minOccurs="0"/>
<xs:element name="title" type="atom:textType" minOccurs="0"/>
<xs:element name="updated" type="atom:dateTimeType" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:complexType>
<xs:complexType name="uriType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="dateTimeType">
<xs:simpleContent>
<xs:extension base="xs:dateTime">
<xs:attributeGroup ref="atom:commonAttributes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:attributeGroup name="commonAttributes">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:anyAttribute namespace="##other"/>
</xs:attributeGroup>
</xs:schema>