-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmetalink4.xsd
225 lines (225 loc) · 8.14 KB
/
metalink4.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
-*- rnc -*-
RELAX NG Compact Syntax Grammar for the
Metalink Format Specification Version 4
Based on RFC 4287 schema
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:ietf:params:xml:ns:metalink" xmlns:metalink="urn:ietf:params:xml:ns:metalink">
<xsd:import schemaLocation="local.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<!-- Common attributes -->
<xsd:attributeGroup name="metalinkCommonAttributes">
<xsd:attribute ref="xml:lang"/>
<xsd:attributeGroup ref="metalink:undefinedAttribute"/>
</xsd:attributeGroup>
<!-- Text Constructs -->
<xsd:attributeGroup name="metalinkTextConstruct">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
</xsd:attributeGroup>
<!-- Date Construct -->
<xsd:complexType name="metalinkDateConstruct">
<xsd:simpleContent>
<xsd:extension base="xsd:dateTime">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="metalink">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="metalink:file"/>
<xsd:element ref="metalink:generator"/>
<xsd:element ref="metalink:origin"/>
<xsd:element ref="metalink:published"/>
<xsd:element ref="metalink:updated"/>
<xsd:group ref="metalink:extensionElement"/>
</xsd:choice>
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="file">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="metalink:copyright"/>
<xsd:element ref="metalink:description"/>
<xsd:element ref="metalink:hash"/>
<xsd:element ref="metalink:identity"/>
<xsd:element ref="metalink:language"/>
<xsd:element ref="metalink:logo"/>
<xsd:element ref="metalink:metaurl"/>
<xsd:element ref="metalink:url"/>
<xsd:element ref="metalink:os"/>
<xsd:element ref="metalink:pieces"/>
<xsd:element ref="metalink:publisher"/>
<xsd:element ref="metalink:signature"/>
<xsd:element ref="metalink:size"/>
<xsd:element ref="metalink:version"/>
<xsd:group ref="metalink:extensionElement"/>
</xsd:choice>
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
<xsd:attribute name="name" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="pieces">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" ref="metalink:hash"/>
</xsd:sequence>
<xsd:attribute name="length" use="required" type="xsd:positiveInteger"/>
<xsd:attribute name="type" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="copyright">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="description">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="generator">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="hash">
<xsd:complexType mixed="true">
<xsd:attribute name="type"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="identity">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="language">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="logo">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="metaurl">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
<xsd:attribute name="priority">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxInclusive value="999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="mediatype" use="required"/>
<xsd:attribute name="name"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="origin">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
<xsd:attribute name="dynamic" type="xsd:boolean"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="os">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="published" type="metalink:metalinkDateConstruct"/>
<xsd:element name="publisher">
<xsd:complexType>
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
<xsd:attribute name="name" use="required"/>
<xsd:attribute name="url"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="signature">
<xsd:complexType mixed="true">
<xsd:attribute name="mediatype" use="required"/>
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="size" type="xsd:nonNegativeInteger"/>
<xsd:element name="updated" type="metalink:metalinkDateConstruct"/>
<xsd:element name="url">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkCommonAttributes"/>
<xsd:attribute name="location">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="2"/>
<xsd:maxLength value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="priority">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxInclusive value="999999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="version">
<xsd:complexType mixed="true">
<xsd:attributeGroup ref="metalink:metalinkTextConstruct"/>
</xsd:complexType>
</xsd:element>
<!-- As defined in RFC 3066 and compatible with RFC 5646 -->
<xsd:simpleType name="metalinkLanguageTag">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*"/>
</xsd:restriction>
</xsd:simpleType>
<!--
Unconstrained; it's not entirely clear how IRI fit into
xsd:anyURI so let's not try to constrain it here
-->
<!-- Simple Extension -->
<xsd:group name="simpleExtensionElement">
<xsd:choice>
<xsd:any namespace="##other" processContents="skip"/>
<xsd:any namespace="##local" processContents="skip"/>
</xsd:choice>
</xsd:group>
<!-- Structured Extension -->
<xsd:group name="structuredExtensionElement">
<xsd:choice>
<xsd:any namespace="##other" processContents="skip"/>
<xsd:any namespace="##local" processContents="skip"/>
</xsd:choice>
</xsd:group>
<!-- Other Extensibility -->
<xsd:group name="extensionElement">
<xsd:choice>
<xsd:group ref="metalink:simpleExtensionElement"/>
<xsd:group ref="metalink:structuredExtensionElement"/>
</xsd:choice>
</xsd:group>
<xsd:attributeGroup name="undefinedAttribute">
<xsd:attributeGroup ref="local"/>
</xsd:attributeGroup>
<xsd:group name="undefinedContent">
<xsd:sequence>
<xsd:group minOccurs="0" maxOccurs="unbounded" ref="metalink:anyForeignElement"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="anyElement">
<xsd:sequence>
<xsd:any processContents="skip"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="anyForeignElement">
<xsd:choice>
<xsd:any namespace="##other" processContents="skip"/>
<xsd:any namespace="##local" processContents="skip"/>
</xsd:choice>
</xsd:group>
</xsd:schema>
<!-- EOF -->