xref: /aosp_15_r20/prebuilts/devtools/repository/sdk-repository-02.xsd (revision 4bfccde5c7e9ea06f821db40ef0af54f6695c320)
1*4bfccde5SXin Li<?xml version="1.0" encoding="UTF-8"?>
2*4bfccde5SXin Li<!--
3*4bfccde5SXin Li * Copyright (C) 2009 The Android Open Source Project
4*4bfccde5SXin Li *
5*4bfccde5SXin Li * Licensed under the Apache License, Version 2.0 (the "License");
6*4bfccde5SXin Li * you may not use this file except in compliance with the License.
7*4bfccde5SXin Li * You may obtain a copy of the License at
8*4bfccde5SXin Li *
9*4bfccde5SXin Li *      http://www.apache.org/licenses/LICENSE-2.0
10*4bfccde5SXin Li *
11*4bfccde5SXin Li * Unless required by applicable law or agreed to in writing, software
12*4bfccde5SXin Li * distributed under the License is distributed on an "AS IS" BASIS,
13*4bfccde5SXin Li * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*4bfccde5SXin Li * See the License for the specific language governing permissions and
15*4bfccde5SXin Li * limitations under the License.
16*4bfccde5SXin Li-->
17*4bfccde5SXin Li<xsd:schema
18*4bfccde5SXin Li    targetNamespace="http://schemas.android.com/sdk/android/repository/2"
19*4bfccde5SXin Li    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20*4bfccde5SXin Li    xmlns:sr2="http://schemas.android.com/sdk/android/repository/2"
21*4bfccde5SXin Li    elementFormDefault="qualified"
22*4bfccde5SXin Li    attributeFormDefault="unqualified"
23*4bfccde5SXin Li    version="1">
24*4bfccde5SXin Li
25*4bfccde5SXin Li    <!-- The repository contains a collection of downloadable items known as
26*4bfccde5SXin Li         "packages". Each package has a type and various attributes and contains
27*4bfccde5SXin Li         a list of file "archives" that can be downloaded for specific OSes.
28*4bfccde5SXin Li
29*4bfccde5SXin Li         An Android SDK repository is a web site that contains a "repository.xml"
30*4bfccde5SXin Li         file that conforms to this XML Schema.
31*4bfccde5SXin Li
32*4bfccde5SXin Li         History:
33*4bfccde5SXin Li         - v1 is used by the SDK Updater in Tools r3 and r4.
34*4bfccde5SXin Li         - v2 is used by the SDK Updater in Tools r5:
35*4bfccde5SXin Li            - new <sample> repository type.
36*4bfccde5SXin Li            - new <obsolete> in all repository types.
37*4bfccde5SXin Li    -->
38*4bfccde5SXin Li
39*4bfccde5SXin Li    <xsd:element name="sdk-repository" type="sr2:repositoryType" />
40*4bfccde5SXin Li
41*4bfccde5SXin Li    <xsd:complexType name="repositoryType">
42*4bfccde5SXin Li        <xsd:annotation>
43*4bfccde5SXin Li            <xsd:documentation>
44*4bfccde5SXin Li                The repository contains a collection of downloadable packages.
45*4bfccde5SXin Li            </xsd:documentation>
46*4bfccde5SXin Li        </xsd:annotation>
47*4bfccde5SXin Li        <xsd:choice minOccurs="0" maxOccurs="unbounded">
48*4bfccde5SXin Li            <xsd:element name="platform" type="sr2:platformType" />
49*4bfccde5SXin Li            <xsd:element name="add-on"   type="sr2:addonType"    />
50*4bfccde5SXin Li            <xsd:element name="tool"     type="sr2:toolType"     />
51*4bfccde5SXin Li            <xsd:element name="doc"      type="sr2:docType"      />
52*4bfccde5SXin Li            <xsd:element name="sample"   type="sr2:sampleType"   />
53*4bfccde5SXin Li            <xsd:element name="extra"    type="sr2:extraType"    />
54*4bfccde5SXin Li            <xsd:element name="license"  type="sr2:licenseType"  />
55*4bfccde5SXin Li        </xsd:choice>
56*4bfccde5SXin Li    </xsd:complexType>
57*4bfccde5SXin Li
58*4bfccde5SXin Li    <!-- The definition of an SDK platform package. -->
59*4bfccde5SXin Li
60*4bfccde5SXin Li    <xsd:complexType name="platformType">
61*4bfccde5SXin Li        <xsd:annotation>
62*4bfccde5SXin Li            <xsd:documentation>An SDK platform package.</xsd:documentation>
63*4bfccde5SXin Li        </xsd:annotation>
64*4bfccde5SXin Li        <xsd:all>
65*4bfccde5SXin Li            <!-- The Android platform version. It is string such as "1.0". -->
66*4bfccde5SXin Li            <xsd:element name="version"   type="xsd:normalizedString" />
67*4bfccde5SXin Li            <!-- The Android API Level for the platform. An int > 0. -->
68*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
69*4bfccde5SXin Li            <!-- The optional codename for this platform, if it's a preview. -->
70*4bfccde5SXin Li            <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
71*4bfccde5SXin Li
72*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
73*4bfccde5SXin Li                 package is generated. -->
74*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
75*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
76*4bfccde5SXin Li                 to agree to it before downloading. -->
77*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
78*4bfccde5SXin Li            <!-- The optional description of this package. -->
79*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
80*4bfccde5SXin Li            <!-- The optional description URL of this package -->
81*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
82*4bfccde5SXin Li            <!-- The optional release note for this package. -->
83*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
84*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
85*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
86*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
87*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
88*4bfccde5SXin Li            <!-- The minimal revision of tools required by this package.
89*4bfccde5SXin Li                 Optional. If present, must be an int > 0. -->
90*4bfccde5SXin Li            <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" />
91*4bfccde5SXin Li
92*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
93*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
94*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
95*4bfccde5SXin Li        </xsd:all>
96*4bfccde5SXin Li    </xsd:complexType>
97*4bfccde5SXin Li
98*4bfccde5SXin Li
99*4bfccde5SXin Li    <!-- The definition of an SDK Add-on package. -->
100*4bfccde5SXin Li
101*4bfccde5SXin Li    <xsd:complexType name="addonType">
102*4bfccde5SXin Li        <xsd:annotation>
103*4bfccde5SXin Li            <xsd:documentation>An SDK add-on package.</xsd:documentation>
104*4bfccde5SXin Li        </xsd:annotation>
105*4bfccde5SXin Li        <xsd:all>
106*4bfccde5SXin Li            <!-- The name of the add-on. -->
107*4bfccde5SXin Li            <xsd:element name="name"      type="xsd:normalizedString" />
108*4bfccde5SXin Li            <!-- The vendor of the add-on. -->
109*4bfccde5SXin Li            <xsd:element name="vendor"    type="xsd:normalizedString" />
110*4bfccde5SXin Li            <!-- The Android API Level for the add-on. An int > 0. -->
111*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
112*4bfccde5SXin Li            <!-- Note: Add-ons do not support 'codename' (a.k.a. API previews). -->
113*4bfccde5SXin Li
114*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
115*4bfccde5SXin Li                 package is generated. -->
116*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
117*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
118*4bfccde5SXin Li                 to agree to it before downloading. -->
119*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
120*4bfccde5SXin Li            <!-- The optional description of this package. -->
121*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
122*4bfccde5SXin Li            <!-- The optional description URL of this package -->
123*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
124*4bfccde5SXin Li            <!-- The optional release note for this package. -->
125*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
126*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
127*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
128*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
129*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
130*4bfccde5SXin Li
131*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
132*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
133*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
134*4bfccde5SXin Li
135*4bfccde5SXin Li            <!-- An add-on can declare 0 or more libraries. -->
136*4bfccde5SXin Li
137*4bfccde5SXin Li            <xsd:element name="libs">
138*4bfccde5SXin Li                <xsd:complexType>
139*4bfccde5SXin Li                    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
140*4bfccde5SXin Li                        <xsd:element name="lib">
141*4bfccde5SXin Li                            <xsd:complexType>
142*4bfccde5SXin Li                                <xsd:all>
143*4bfccde5SXin Li                                    <!-- The name of the library. -->
144*4bfccde5SXin Li                                    <xsd:element name="name" type="xsd:normalizedString" />
145*4bfccde5SXin Li                                    <!-- The optional description of this add-on library. -->
146*4bfccde5SXin Li                                    <xsd:element name="description" type="xsd:string" minOccurs="0" />
147*4bfccde5SXin Li                                </xsd:all>
148*4bfccde5SXin Li                            </xsd:complexType>
149*4bfccde5SXin Li                        </xsd:element>
150*4bfccde5SXin Li                    </xsd:sequence>
151*4bfccde5SXin Li                </xsd:complexType>
152*4bfccde5SXin Li            </xsd:element>
153*4bfccde5SXin Li        </xsd:all>
154*4bfccde5SXin Li    </xsd:complexType>
155*4bfccde5SXin Li
156*4bfccde5SXin Li
157*4bfccde5SXin Li    <!-- The definition of an SDK tool package. -->
158*4bfccde5SXin Li
159*4bfccde5SXin Li    <xsd:complexType name="toolType" >
160*4bfccde5SXin Li        <xsd:annotation>
161*4bfccde5SXin Li            <xsd:documentation>An SDK tool package.</xsd:documentation>
162*4bfccde5SXin Li        </xsd:annotation>
163*4bfccde5SXin Li        <xsd:all>
164*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
165*4bfccde5SXin Li                 package is generated. -->
166*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
167*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
168*4bfccde5SXin Li                 to agree to it before downloading. -->
169*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
170*4bfccde5SXin Li            <!-- The optional description of this package. -->
171*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
172*4bfccde5SXin Li            <!-- The optional description URL of this package -->
173*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
174*4bfccde5SXin Li            <!-- The optional release note for this package. -->
175*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
176*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
177*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
178*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
179*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
180*4bfccde5SXin Li
181*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
182*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
183*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
184*4bfccde5SXin Li        </xsd:all>
185*4bfccde5SXin Li    </xsd:complexType>
186*4bfccde5SXin Li
187*4bfccde5SXin Li
188*4bfccde5SXin Li    <!-- The definition of an SDK doc package. -->
189*4bfccde5SXin Li
190*4bfccde5SXin Li    <xsd:complexType name="docType" >
191*4bfccde5SXin Li        <xsd:annotation>
192*4bfccde5SXin Li            <xsd:documentation>An SDK doc package.</xsd:documentation>
193*4bfccde5SXin Li        </xsd:annotation>
194*4bfccde5SXin Li        <xsd:all>
195*4bfccde5SXin Li            <!-- The Android API Level for the documentation. An int > 0. -->
196*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
197*4bfccde5SXin Li            <!-- The optional codename for this doc, if it's a preview. -->
198*4bfccde5SXin Li            <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
199*4bfccde5SXin Li
200*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
201*4bfccde5SXin Li                 package is generated. -->
202*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
203*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
204*4bfccde5SXin Li                 to agree to it before downloading. -->
205*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
206*4bfccde5SXin Li            <!-- The optional description of this package. -->
207*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
208*4bfccde5SXin Li            <!-- The optional description URL of this package -->
209*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
210*4bfccde5SXin Li            <!-- The optional release note for this package. -->
211*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
212*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
213*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
214*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
215*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
216*4bfccde5SXin Li
217*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
218*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
219*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
220*4bfccde5SXin Li        </xsd:all>
221*4bfccde5SXin Li    </xsd:complexType>
222*4bfccde5SXin Li
223*4bfccde5SXin Li
224*4bfccde5SXin Li    <!-- The definition of an SDK sample package. -->
225*4bfccde5SXin Li
226*4bfccde5SXin Li    <xsd:complexType name="sampleType" >
227*4bfccde5SXin Li        <xsd:annotation>
228*4bfccde5SXin Li            <xsd:documentation>An SDK sample package.</xsd:documentation>
229*4bfccde5SXin Li        </xsd:annotation>
230*4bfccde5SXin Li        <xsd:all>
231*4bfccde5SXin Li            <!-- The Android API Level for the documentation. An int > 0. -->
232*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
233*4bfccde5SXin Li            <!-- The optional codename for this doc, if it's a preview. -->
234*4bfccde5SXin Li            <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
235*4bfccde5SXin Li
236*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
237*4bfccde5SXin Li                 package is generated. -->
238*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
239*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
240*4bfccde5SXin Li                 to agree to it before downloading. -->
241*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
242*4bfccde5SXin Li            <!-- The optional description of this package. -->
243*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
244*4bfccde5SXin Li            <!-- The optional description URL of this package -->
245*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
246*4bfccde5SXin Li            <!-- The optional release note for this package. -->
247*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
248*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
249*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
250*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
251*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
252*4bfccde5SXin Li            <!-- The minimal revision of tools required by this package.
253*4bfccde5SXin Li                 Optional. If present, must be an int > 0. -->
254*4bfccde5SXin Li            <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" />
255*4bfccde5SXin Li
256*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
257*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
258*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
259*4bfccde5SXin Li        </xsd:all>
260*4bfccde5SXin Li    </xsd:complexType>
261*4bfccde5SXin Li
262*4bfccde5SXin Li
263*4bfccde5SXin Li    <!-- The definition of an SDK extra package. This kind of package is for
264*4bfccde5SXin Li         "free" content and specifies in which fixed root directory it must be
265*4bfccde5SXin Li         installed.
266*4bfccde5SXin Li    -->
267*4bfccde5SXin Li
268*4bfccde5SXin Li    <xsd:complexType name="extraType" >
269*4bfccde5SXin Li        <xsd:annotation>
270*4bfccde5SXin Li            <xsd:documentation>
271*4bfccde5SXin Li                An SDK extra package. This kind of package is for "free"
272*4bfccde5SXin Li                content and specifies in which fixed root directory it must be
273*4bfccde5SXin Li                installed.
274*4bfccde5SXin Li                The paths "add-ons", "platforms", "tools" and "docs" are
275*4bfccde5SXin Li                reserved and cannot be used.
276*4bfccde5SXin Li            </xsd:documentation>
277*4bfccde5SXin Li        </xsd:annotation>
278*4bfccde5SXin Li        <xsd:all>
279*4bfccde5SXin Li            <!-- The install folder name. It must be a single-segment path.
280*4bfccde5SXin Li                 The paths "add-ons", "platforms", "tools" and "docs" are
281*4bfccde5SXin Li                 reserved and cannot be used.
282*4bfccde5SXin Li            -->
283*4bfccde5SXin Li            <xsd:element name="path">
284*4bfccde5SXin Li                <xsd:simpleType>
285*4bfccde5SXin Li                    <xsd:restriction base="xsd:token">
286*4bfccde5SXin Li                        <xsd:pattern value="[^/\\]+"/>
287*4bfccde5SXin Li                    </xsd:restriction>
288*4bfccde5SXin Li                </xsd:simpleType>
289*4bfccde5SXin Li            </xsd:element>
290*4bfccde5SXin Li
291*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
292*4bfccde5SXin Li                 package is generated. -->
293*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
294*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
295*4bfccde5SXin Li                 to agree to it before downloading. -->
296*4bfccde5SXin Li            <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" />
297*4bfccde5SXin Li            <!-- The optional description of this package. -->
298*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
299*4bfccde5SXin Li            <!-- The optional description URL of this package -->
300*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
301*4bfccde5SXin Li            <!-- The optional release note for this package. -->
302*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
303*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
304*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
305*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
306*4bfccde5SXin Li            <xsd:element name="archives"     type="sr2:archivesType" />
307*4bfccde5SXin Li            <!-- The minimal revision of tools required by this package.
308*4bfccde5SXin Li                 Optional. If present, must be an int > 0. -->
309*4bfccde5SXin Li            <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" />
310*4bfccde5SXin Li            <!-- The minimal API level required by this package.
311*4bfccde5SXin Li                 Optional. If present, must be an int > 0. -->
312*4bfccde5SXin Li            <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" />
313*4bfccde5SXin Li
314*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
315*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
316*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
317*4bfccde5SXin Li        </xsd:all>
318*4bfccde5SXin Li    </xsd:complexType>
319*4bfccde5SXin Li
320*4bfccde5SXin Li
321*4bfccde5SXin Li    <!-- The definition of a license to be referenced by the uses-license element. -->
322*4bfccde5SXin Li
323*4bfccde5SXin Li    <xsd:complexType name="licenseType">
324*4bfccde5SXin Li        <xsd:annotation>
325*4bfccde5SXin Li            <xsd:documentation>
326*4bfccde5SXin Li                A license definition. Such a license must be used later as a reference
327*4bfccde5SXin Li                using a uses-license element in one of the package elements.
328*4bfccde5SXin Li            </xsd:documentation>
329*4bfccde5SXin Li        </xsd:annotation>
330*4bfccde5SXin Li        <xsd:simpleContent>
331*4bfccde5SXin Li            <xsd:extension base="xsd:string">
332*4bfccde5SXin Li                <xsd:attribute name="id"   type="xsd:ID" />
333*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="text" />
334*4bfccde5SXin Li            </xsd:extension>
335*4bfccde5SXin Li        </xsd:simpleContent>
336*4bfccde5SXin Li    </xsd:complexType>
337*4bfccde5SXin Li
338*4bfccde5SXin Li
339*4bfccde5SXin Li    <!-- Type describing the license used by a package.
340*4bfccde5SXin Li         The license MUST be defined using a license node and referenced
341*4bfccde5SXin Li         using the ref attribute of the license element inside a package.
342*4bfccde5SXin Li     -->
343*4bfccde5SXin Li
344*4bfccde5SXin Li    <xsd:complexType name="usesLicenseType">
345*4bfccde5SXin Li        <xsd:annotation>
346*4bfccde5SXin Li            <xsd:documentation>
347*4bfccde5SXin Li                Describes the license used by a package. The license MUST be defined
348*4bfccde5SXin Li                using a license node and referenced using the ref attribute of the
349*4bfccde5SXin Li                license element inside a package.
350*4bfccde5SXin Li            </xsd:documentation>
351*4bfccde5SXin Li        </xsd:annotation>
352*4bfccde5SXin Li        <xsd:attribute name="ref" type="xsd:IDREF" />
353*4bfccde5SXin Li    </xsd:complexType>
354*4bfccde5SXin Li
355*4bfccde5SXin Li
356*4bfccde5SXin Li    <!-- A collection of files that can be downloaded for a given architecture.
357*4bfccde5SXin Li         The <archives> node is mandatory in the repository elements and the
358*4bfccde5SXin Li         collection must have at least one <archive> declared.
359*4bfccde5SXin Li         Each archive is a zip file that will be unzipped in a location that depends
360*4bfccde5SXin Li         on its package type.
361*4bfccde5SXin Li     -->
362*4bfccde5SXin Li
363*4bfccde5SXin Li    <xsd:complexType name="archivesType">
364*4bfccde5SXin Li        <xsd:annotation>
365*4bfccde5SXin Li            <xsd:documentation>
366*4bfccde5SXin Li                A collection of files that can be downloaded for a given architecture.
367*4bfccde5SXin Li                The &lt;archives&gt; node is mandatory in the repository packages and the
368*4bfccde5SXin Li                collection must have at least one &lt;archive&gt; declared.
369*4bfccde5SXin Li                Each archive is a zip file that will be unzipped in a location that depends
370*4bfccde5SXin Li                on its package type.
371*4bfccde5SXin Li            </xsd:documentation>
372*4bfccde5SXin Li        </xsd:annotation>
373*4bfccde5SXin Li        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
374*4bfccde5SXin Li            <!-- One archive file -->
375*4bfccde5SXin Li            <xsd:element name="archive">
376*4bfccde5SXin Li                <xsd:complexType>
377*4bfccde5SXin Li                    <!-- Properties of the archive file -->
378*4bfccde5SXin Li                    <xsd:all>
379*4bfccde5SXin Li                        <!-- The size in bytes of the archive to download. -->
380*4bfccde5SXin Li                        <xsd:element name="size"     type="xsd:positiveInteger" />
381*4bfccde5SXin Li                        <!-- The checksum of the archive file. -->
382*4bfccde5SXin Li                        <xsd:element name="checksum" type="sr2:checksumType" />
383*4bfccde5SXin Li                        <!-- The URL is an absolute URL if it starts with http://, https://
384*4bfccde5SXin Li                             or ftp://. Otherwise it is relative to the parent directory that
385*4bfccde5SXin Li                             contains this repository.xml -->
386*4bfccde5SXin Li                        <xsd:element name="url"      type="xsd:token" />
387*4bfccde5SXin Li                    </xsd:all>
388*4bfccde5SXin Li
389*4bfccde5SXin Li                    <!-- Attributes that identify the OS and architecture -->
390*4bfccde5SXin Li                    <xsd:attribute name="os" use="required">
391*4bfccde5SXin Li                        <xsd:simpleType>
392*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
393*4bfccde5SXin Li                                <xsd:enumeration value="any" />
394*4bfccde5SXin Li                                <xsd:enumeration value="linux" />
395*4bfccde5SXin Li                                <xsd:enumeration value="macosx" />
396*4bfccde5SXin Li                                <xsd:enumeration value="windows" />
397*4bfccde5SXin Li                            </xsd:restriction>
398*4bfccde5SXin Li                        </xsd:simpleType>
399*4bfccde5SXin Li                    </xsd:attribute>
400*4bfccde5SXin Li                    <xsd:attribute name="arch" use="optional">
401*4bfccde5SXin Li                        <xsd:simpleType>
402*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
403*4bfccde5SXin Li                                <xsd:enumeration value="any" />
404*4bfccde5SXin Li                                <xsd:enumeration value="ppc" />
405*4bfccde5SXin Li                                <xsd:enumeration value="x86" />
406*4bfccde5SXin Li                                <xsd:enumeration value="x86_64" />
407*4bfccde5SXin Li                            </xsd:restriction>
408*4bfccde5SXin Li                        </xsd:simpleType>
409*4bfccde5SXin Li                    </xsd:attribute>
410*4bfccde5SXin Li                </xsd:complexType>
411*4bfccde5SXin Li            </xsd:element>
412*4bfccde5SXin Li        </xsd:sequence>
413*4bfccde5SXin Li    </xsd:complexType>
414*4bfccde5SXin Li
415*4bfccde5SXin Li
416*4bfccde5SXin Li    <!-- The definition of a file checksum -->
417*4bfccde5SXin Li
418*4bfccde5SXin Li    <xsd:simpleType name="sha1Number">
419*4bfccde5SXin Li        <xsd:annotation>
420*4bfccde5SXin Li            <xsd:documentation>A SHA1 checksum.</xsd:documentation>
421*4bfccde5SXin Li        </xsd:annotation>
422*4bfccde5SXin Li        <xsd:restriction base="xsd:string">
423*4bfccde5SXin Li            <xsd:pattern value="([0-9a-fA-F]){40}"/>
424*4bfccde5SXin Li        </xsd:restriction>
425*4bfccde5SXin Li    </xsd:simpleType>
426*4bfccde5SXin Li
427*4bfccde5SXin Li    <xsd:complexType name="checksumType">
428*4bfccde5SXin Li        <xsd:annotation>
429*4bfccde5SXin Li            <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
430*4bfccde5SXin Li        </xsd:annotation>
431*4bfccde5SXin Li        <xsd:simpleContent>
432*4bfccde5SXin Li            <xsd:extension base="sr2:sha1Number">
433*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="sha1" />
434*4bfccde5SXin Li            </xsd:extension>
435*4bfccde5SXin Li        </xsd:simpleContent>
436*4bfccde5SXin Li    </xsd:complexType>
437*4bfccde5SXin Li
438*4bfccde5SXin Li</xsd:schema>
439