xref: /aosp_15_r20/prebuilts/devtools/repository/sdk-addon-06.xsd (revision 4bfccde5c7e9ea06f821db40ef0af54f6695c320)
1*4bfccde5SXin Li<?xml version="1.0" encoding="UTF-8"?>
2*4bfccde5SXin Li<!--
3*4bfccde5SXin Li * Copyright (C) 2013 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/addon/6"
19*4bfccde5SXin Li    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20*4bfccde5SXin Li    xmlns:sdk="http://schemas.android.com/sdk/android/addon/6"
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 Addon repository is a web site that contains an "addon.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 r8. It is split out of the
34*4bfccde5SXin Li           main SDK Repository XML Schema and can only contain <addon> and
35*4bfccde5SXin Li           <extra> packages.
36*4bfccde5SXin Li
37*4bfccde5SXin Li         - v2 is used by the SDK Updater in Tools r12.
38*4bfccde5SXin Li            - <extra> element now has a <project-files> element that contains 1 or
39*4bfccde5SXin Li              or more <path>, each indicating the relative path of a file that this package
40*4bfccde5SXin Li              can contribute to installed projects.
41*4bfccde5SXin Li            - <addon> element now has an optional <layoutlib> that indicates the API
42*4bfccde5SXin Li              and revision of the layout library for this particular add-on, if any.
43*4bfccde5SXin Li
44*4bfccde5SXin Li         - v3 is used by the SDK Manager in Tools r14:
45*4bfccde5SXin Li            - <extra> now has an <old-paths> element, a ;-separated list of old paths that
46*4bfccde5SXin Li              should be detected and migrated to the new <path> for that package.
47*4bfccde5SXin Li
48*4bfccde5SXin Li         - v4 is used by the SDK Manager in Tools r18:
49*4bfccde5SXin Li            - <extra> and <addon> are not in the Repository XSD v6 anymore.
50*4bfccde5SXin Li            - <extra> get a new field <name-display>, which is used by the SDK Manager to
51*4bfccde5SXin Li              customize the name of the extra in the list display. The single <vendor>
52*4bfccde5SXin Li              field becomes <vendor-id> and <vendor-display>, the id being used internally
53*4bfccde5SXin Li              and the display in the UI.
54*4bfccde5SXin Li            - <addon> does the same, where <name> is replaced by <name-id> and <name-display>
55*4bfccde5SXin Li              and <vendor> is replaced by <vendor-id> and <vendor-display>.
56*4bfccde5SXin Li
57*4bfccde5SXin Li         - v5 is used by the SDK Manager in Tools r20:
58*4bfccde5SXin Li            - The <beta-rc> element is no longer supported. It was never implemented anyway.
59*4bfccde5SXin Li            - For <tool> and <platform-tool> packages, the <revision> element becomes a
60*4bfccde5SXin Li              a "full revision" element with <major>, <minor>, <micro> and <preview> sub-elements.
61*4bfccde5SXin Li            - <min-tools-rev> for <extra> becomes a full revision element.
62*4bfccde5SXin Li
63*4bfccde5SXin Li         - v6 is used by the SDK Manager in Tools r22.3:
64*4bfccde5SXin Li            - <extra> revision is now a "full revision" element with <major>, <minor>, <micro>.
65*4bfccde5SXin Li              It does not support the <revision><preview> sub-element though.
66*4bfccde5SXin Li    -->
67*4bfccde5SXin Li
68*4bfccde5SXin Li    <xsd:element name="sdk-addon" type="sdk:repositoryType" />
69*4bfccde5SXin Li
70*4bfccde5SXin Li    <xsd:complexType name="repositoryType">
71*4bfccde5SXin Li        <xsd:annotation>
72*4bfccde5SXin Li            <xsd:documentation>
73*4bfccde5SXin Li                The repository contains a collection of downloadable packages.
74*4bfccde5SXin Li            </xsd:documentation>
75*4bfccde5SXin Li        </xsd:annotation>
76*4bfccde5SXin Li        <xsd:choice minOccurs="0" maxOccurs="unbounded">
77*4bfccde5SXin Li            <xsd:element name="add-on"          type="sdk:addonType"        />
78*4bfccde5SXin Li            <xsd:element name="extra"           type="sdk:extraType"        />
79*4bfccde5SXin Li            <xsd:element name="license"         type="sdk:licenseType"      />
80*4bfccde5SXin Li        </xsd:choice>
81*4bfccde5SXin Li    </xsd:complexType>
82*4bfccde5SXin Li
83*4bfccde5SXin Li
84*4bfccde5SXin Li    <!-- The definition of an SDK Add-on package. -->
85*4bfccde5SXin Li
86*4bfccde5SXin Li    <xsd:complexType name="addonType">
87*4bfccde5SXin Li        <xsd:annotation>
88*4bfccde5SXin Li            <xsd:documentation>An SDK add-on package.</xsd:documentation>
89*4bfccde5SXin Li        </xsd:annotation>
90*4bfccde5SXin Li        <xsd:all>
91*4bfccde5SXin Li            <!-- The internal name id of the add-on. Must be unique per vendor. -->
92*4bfccde5SXin Li            <xsd:element name="name-id"         type="sdk:idType" />
93*4bfccde5SXin Li            <!-- The displayed name of the add-on. -->
94*4bfccde5SXin Li            <xsd:element name="name-display"    type="xsd:normalizedString" />
95*4bfccde5SXin Li
96*4bfccde5SXin Li            <!-- The internal vendor id of the add-on. Must be unique amongst vendors. -->
97*4bfccde5SXin Li            <xsd:element name="vendor-id"       type="sdk:idType" />
98*4bfccde5SXin Li            <!-- The displayed vendor name of the add-on. -->
99*4bfccde5SXin Li            <xsd:element name="vendor-display"  type="xsd:normalizedString" />
100*4bfccde5SXin Li
101*4bfccde5SXin Li            <!-- The Android API Level for the add-on. An int > 0. -->
102*4bfccde5SXin Li            <xsd:element name="api-level"    type="xsd:positiveInteger"  />
103*4bfccde5SXin Li            <!-- Note: Add-ons do not support 'codenames' (a.k.a. API previews). -->
104*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
105*4bfccde5SXin Li                 package is generated. -->
106*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:positiveInteger" />
107*4bfccde5SXin Li
108*4bfccde5SXin Li            <!-- An add-on can declare 0 or more libraries.
109*4bfccde5SXin Li                 This element is mandatory but it can be empty.
110*4bfccde5SXin Li            -->
111*4bfccde5SXin Li
112*4bfccde5SXin Li            <xsd:element name="libs">
113*4bfccde5SXin Li                <xsd:complexType>
114*4bfccde5SXin Li                    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
115*4bfccde5SXin Li                        <xsd:element name="lib">
116*4bfccde5SXin Li                            <xsd:complexType>
117*4bfccde5SXin Li                                <xsd:all>
118*4bfccde5SXin Li                                    <!-- The name of the library. -->
119*4bfccde5SXin Li                                    <xsd:element name="name" type="xsd:normalizedString" />
120*4bfccde5SXin Li                                    <!-- The optional description of this add-on library. -->
121*4bfccde5SXin Li                                    <xsd:element name="description" type="xsd:string" minOccurs="0" />
122*4bfccde5SXin Li                                </xsd:all>
123*4bfccde5SXin Li                            </xsd:complexType>
124*4bfccde5SXin Li                        </xsd:element>
125*4bfccde5SXin Li                    </xsd:sequence>
126*4bfccde5SXin Li                </xsd:complexType>
127*4bfccde5SXin Li            </xsd:element>
128*4bfccde5SXin Li
129*4bfccde5SXin Li            <!-- optional elements -->
130*4bfccde5SXin Li
131*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
132*4bfccde5SXin Li                 to agree to it before downloading. -->
133*4bfccde5SXin Li            <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" />
134*4bfccde5SXin Li            <!-- The optional description of this package. -->
135*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
136*4bfccde5SXin Li            <!-- The optional description URL of this package -->
137*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
138*4bfccde5SXin Li            <!-- The optional release note for this package. -->
139*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
140*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
141*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
142*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
143*4bfccde5SXin Li            <xsd:element name="archives"     type="sdk:archivesType" />
144*4bfccde5SXin Li
145*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
146*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
147*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
148*4bfccde5SXin Li
149*4bfccde5SXin Li            <!-- Optional information on the layoutlib packaged in this platform. -->
150*4bfccde5SXin Li            <xsd:element name="layoutlib" type="sdk:layoutlibType"  minOccurs="0" />
151*4bfccde5SXin Li        </xsd:all>
152*4bfccde5SXin Li    </xsd:complexType>
153*4bfccde5SXin Li
154*4bfccde5SXin Li
155*4bfccde5SXin Li    <xsd:simpleType name="idType">
156*4bfccde5SXin Li        <xsd:annotation>
157*4bfccde5SXin Li            <xsd:documentation>
158*4bfccde5SXin Li                An ID string for an addon/extra name-id or vendor-id
159*4bfccde5SXin Li                can only be simple alphanumeric string.
160*4bfccde5SXin Li            </xsd:documentation>
161*4bfccde5SXin Li        </xsd:annotation>
162*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
163*4bfccde5SXin Li            <xsd:pattern value="[a-zA-Z0-9_-]+"/>
164*4bfccde5SXin Li        </xsd:restriction>
165*4bfccde5SXin Li    </xsd:simpleType>
166*4bfccde5SXin Li
167*4bfccde5SXin Li
168*4bfccde5SXin Li    <!-- The definition of a layout library used by an addon. -->
169*4bfccde5SXin Li
170*4bfccde5SXin Li    <xsd:complexType name="layoutlibType" >
171*4bfccde5SXin Li        <xsd:annotation>
172*4bfccde5SXin Li            <xsd:documentation>
173*4bfccde5SXin Li                Version information for a layoutlib included in an addon.
174*4bfccde5SXin Li            .</xsd:documentation>
175*4bfccde5SXin Li        </xsd:annotation>
176*4bfccde5SXin Li        <xsd:all>
177*4bfccde5SXin Li            <!-- The layoutlib API level, an int > 0,
178*4bfccde5SXin Li                 incremented with each new incompatible lib. -->
179*4bfccde5SXin Li            <xsd:element name="api"          type="xsd:positiveInteger" />
180*4bfccde5SXin Li            <!-- The incremental minor revision for that API, e.g. in case of bug fixes.
181*4bfccde5SXin Li                 Optional. An int >= 0, assumed to be 0 if the element is missing. -->
182*4bfccde5SXin Li            <xsd:element name="revision"     type="xsd:nonNegativeInteger" minOccurs="0" />
183*4bfccde5SXin Li        </xsd:all>
184*4bfccde5SXin Li    </xsd:complexType>
185*4bfccde5SXin Li
186*4bfccde5SXin Li
187*4bfccde5SXin Li    <!-- The definition of an SDK extra package. This kind of package is for
188*4bfccde5SXin Li         "free" content. Such packages are installed in SDK/extras/vendor/path.
189*4bfccde5SXin Li    -->
190*4bfccde5SXin Li
191*4bfccde5SXin Li    <xsd:complexType name="extraType" >
192*4bfccde5SXin Li        <xsd:annotation>
193*4bfccde5SXin Li            <xsd:documentation>
194*4bfccde5SXin Li                An SDK extra package. This kind of package is for "free" content.
195*4bfccde5SXin Li                Such packages are installed in SDK/vendor/path.
196*4bfccde5SXin Li            </xsd:documentation>
197*4bfccde5SXin Li        </xsd:annotation>
198*4bfccde5SXin Li        <xsd:all>
199*4bfccde5SXin Li            <!-- The displayed name of the extra. -->
200*4bfccde5SXin Li            <xsd:element name="name-display"    type="xsd:normalizedString" />
201*4bfccde5SXin Li
202*4bfccde5SXin Li            <!-- The internal vendor id of the extra. Must be unique amongst vendors. -->
203*4bfccde5SXin Li            <xsd:element name="vendor-id"       type="sdk:idType" />
204*4bfccde5SXin Li            <!-- The displayed vendor name of the extra. -->
205*4bfccde5SXin Li            <xsd:element name="vendor-display"  type="xsd:normalizedString" />
206*4bfccde5SXin Li
207*4bfccde5SXin Li            <!-- The install path sub-folder name. It must not be empty. -->
208*4bfccde5SXin Li            <xsd:element name="path" type="sdk:segmentType" />
209*4bfccde5SXin Li
210*4bfccde5SXin Li            <!-- A semi-colon separated list of "obsolete" path names which are equivalent
211*4bfccde5SXin Li                 to the current 'path' name. When a package is seen using an old-paths' name,
212*4bfccde5SXin Li                 the package manager will try to upgrade it to the new path. -->
213*4bfccde5SXin Li            <xsd:element name="old-paths" type="sdk:segmentListType"  minOccurs="0" />
214*4bfccde5SXin Li
215*4bfccde5SXin Li            <!-- The revision, in major.minor.micro format, incremented each time a new
216*4bfccde5SXin Li                 package is generated. -->
217*4bfccde5SXin Li            <xsd:element name="revision"     type="sdk:revisionNoPreviewType" minOccurs="0" />
218*4bfccde5SXin Li
219*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
220*4bfccde5SXin Li            <xsd:element name="archives"     type="sdk:archivesType" />
221*4bfccde5SXin Li
222*4bfccde5SXin Li            <!--  optional elements -->
223*4bfccde5SXin Li
224*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
225*4bfccde5SXin Li                 to agree to it before downloading. -->
226*4bfccde5SXin Li            <xsd:element name="uses-license" type="sdk:usesLicenseType"  minOccurs="0" />
227*4bfccde5SXin Li            <!-- The optional description of this package. -->
228*4bfccde5SXin Li            <xsd:element name="description"  type="xsd:string"           minOccurs="0" />
229*4bfccde5SXin Li            <!-- The optional description URL of this package -->
230*4bfccde5SXin Li            <xsd:element name="desc-url"     type="xsd:token"            minOccurs="0" />
231*4bfccde5SXin Li            <!-- The optional release note for this package. -->
232*4bfccde5SXin Li            <xsd:element name="release-note" type="xsd:string"           minOccurs="0" />
233*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
234*4bfccde5SXin Li            <xsd:element name="release-url"  type="xsd:token"            minOccurs="0" />
235*4bfccde5SXin Li            <!-- The minimal revision of tools required by this package.
236*4bfccde5SXin Li                 Optional. If present, must be a revision element. -->
237*4bfccde5SXin Li            <xsd:element name="min-tools-rev" type="sdk:revisionType"    minOccurs="0" />
238*4bfccde5SXin Li            <!-- The minimal API level required by this package.
239*4bfccde5SXin Li                 Optional. If present, must be an int > 0. -->
240*4bfccde5SXin Li            <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" />
241*4bfccde5SXin Li
242*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
243*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
244*4bfccde5SXin Li            <xsd:element name="obsolete"      type="xsd:string" minOccurs="0" />
245*4bfccde5SXin Li
246*4bfccde5SXin Li            <!-- A list of project files contributed by this package. Optional. -->
247*4bfccde5SXin Li            <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" />
248*4bfccde5SXin Li        </xsd:all>
249*4bfccde5SXin Li    </xsd:complexType>
250*4bfccde5SXin Li
251*4bfccde5SXin Li
252*4bfccde5SXin Li    <!-- A full revision, with a major.minor.micro and an optional preview number.
253*4bfccde5SXin Li         The major number is mandatory, the other elements are optional.
254*4bfccde5SXin Li     -->
255*4bfccde5SXin Li
256*4bfccde5SXin Li    <xsd:complexType name="revisionType">
257*4bfccde5SXin Li        <xsd:annotation>
258*4bfccde5SXin Li            <xsd:documentation>
259*4bfccde5SXin Li                A full revision, with a major.minor.micro and an
260*4bfccde5SXin Li                optional preview number. The major number is mandatory.
261*4bfccde5SXin Li            </xsd:documentation>
262*4bfccde5SXin Li        </xsd:annotation>
263*4bfccde5SXin Li        <xsd:all>
264*4bfccde5SXin Li            <!-- The major revision, an int > 0, incremented each time a new
265*4bfccde5SXin Li                 package is generated. -->
266*4bfccde5SXin Li            <xsd:element name="major"      type="xsd:positiveInteger" />
267*4bfccde5SXin Li            <!-- The minor revision, an int >= 0, incremented each time a new
268*4bfccde5SXin Li                 minor package is generated. Assumed to be 0 if missing. -->
269*4bfccde5SXin Li            <xsd:element name="minor"     type="xsd:nonNegativeInteger" minOccurs="0" />
270*4bfccde5SXin Li            <!-- The micro revision, an int >= 0, incremented each time a new
271*4bfccde5SXin Li                 buf fix is generated. Assumed to be 0 if missing. -->
272*4bfccde5SXin Li            <xsd:element name="micro"     type="xsd:nonNegativeInteger" minOccurs="0" />
273*4bfccde5SXin Li            <!-- The preview/release candidate revision, an int > 0,
274*4bfccde5SXin Li                 incremented each time a new preview is generated.
275*4bfccde5SXin Li                 Not present for final releases. -->
276*4bfccde5SXin Li            <xsd:element name="preview"   type="xsd:positiveInteger" minOccurs="0" />
277*4bfccde5SXin Li        </xsd:all>
278*4bfccde5SXin Li    </xsd:complexType>
279*4bfccde5SXin Li
280*4bfccde5SXin Li
281*4bfccde5SXin Li    <!-- A full revision, with a major.minor.micro but that does not support the
282*4bfccde5SXin Li         optional preview number.
283*4bfccde5SXin Li         The major number is mandatory, the other elements are optional.
284*4bfccde5SXin Li     -->
285*4bfccde5SXin Li
286*4bfccde5SXin Li    <xsd:complexType name="revisionNoPreviewType">
287*4bfccde5SXin Li        <xsd:annotation>
288*4bfccde5SXin Li            <xsd:documentation>
289*4bfccde5SXin Li                A full revision, with a major.minor.micro and no support for
290*4bfccde5SXin Li                the optional preview number. The major number is mandatory.
291*4bfccde5SXin Li            </xsd:documentation>
292*4bfccde5SXin Li        </xsd:annotation>
293*4bfccde5SXin Li        <xsd:all>
294*4bfccde5SXin Li            <!-- The major revision, an int > 0, incremented each time a new
295*4bfccde5SXin Li                 package is generated. -->
296*4bfccde5SXin Li            <xsd:element name="major"      type="xsd:positiveInteger" />
297*4bfccde5SXin Li            <!-- The minor revision, an int >= 0, incremented each time a new
298*4bfccde5SXin Li                 minor package is generated. Assumed to be 0 if missing. -->
299*4bfccde5SXin Li            <xsd:element name="minor"     type="xsd:nonNegativeInteger" minOccurs="0" />
300*4bfccde5SXin Li            <!-- The micro revision, an int >= 0, incremented each time a new
301*4bfccde5SXin Li                 buf fix is generated. Assumed to be 0 if missing. -->
302*4bfccde5SXin Li            <xsd:element name="micro"     type="xsd:nonNegativeInteger" minOccurs="0" />
303*4bfccde5SXin Li        </xsd:all>
304*4bfccde5SXin Li    </xsd:complexType>
305*4bfccde5SXin Li
306*4bfccde5SXin Li
307*4bfccde5SXin Li    <!-- The definition of a path segment used by the extra element. -->
308*4bfccde5SXin Li
309*4bfccde5SXin Li    <xsd:simpleType name="segmentType">
310*4bfccde5SXin Li        <xsd:annotation>
311*4bfccde5SXin Li            <xsd:documentation>
312*4bfccde5SXin Li                One path segment for the install path of an extra element.
313*4bfccde5SXin Li                It must be a single-segment path. It must not be empty.
314*4bfccde5SXin Li            </xsd:documentation>
315*4bfccde5SXin Li        </xsd:annotation>
316*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
317*4bfccde5SXin Li            <xsd:pattern value="[a-zA-Z0-9_]+"/>
318*4bfccde5SXin Li        </xsd:restriction>
319*4bfccde5SXin Li    </xsd:simpleType>
320*4bfccde5SXin Li
321*4bfccde5SXin Li    <xsd:simpleType name="segmentListType">
322*4bfccde5SXin Li        <xsd:annotation>
323*4bfccde5SXin Li            <xsd:documentation>
324*4bfccde5SXin Li                A semi-colon separated list of a segmentTypes.
325*4bfccde5SXin Li            </xsd:documentation>
326*4bfccde5SXin Li        </xsd:annotation>
327*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
328*4bfccde5SXin Li            <xsd:pattern value="[a-zA-Z0-9_;]+"/>
329*4bfccde5SXin Li        </xsd:restriction>
330*4bfccde5SXin Li    </xsd:simpleType>
331*4bfccde5SXin Li
332*4bfccde5SXin Li
333*4bfccde5SXin Li    <!-- The definition of a license to be referenced by the uses-license element. -->
334*4bfccde5SXin Li
335*4bfccde5SXin Li    <xsd:complexType name="licenseType">
336*4bfccde5SXin Li        <xsd:annotation>
337*4bfccde5SXin Li            <xsd:documentation>
338*4bfccde5SXin Li                A license definition. Such a license must be used later as a reference
339*4bfccde5SXin Li                using a uses-license element in one of the package elements.
340*4bfccde5SXin Li            </xsd:documentation>
341*4bfccde5SXin Li        </xsd:annotation>
342*4bfccde5SXin Li        <xsd:simpleContent>
343*4bfccde5SXin Li            <xsd:extension base="xsd:string">
344*4bfccde5SXin Li                <xsd:attribute name="id"   type="xsd:ID" />
345*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="text" />
346*4bfccde5SXin Li            </xsd:extension>
347*4bfccde5SXin Li        </xsd:simpleContent>
348*4bfccde5SXin Li    </xsd:complexType>
349*4bfccde5SXin Li
350*4bfccde5SXin Li
351*4bfccde5SXin Li    <!-- Type describing the license used by a package.
352*4bfccde5SXin Li         The license MUST be defined using a license node and referenced
353*4bfccde5SXin Li         using the ref attribute of the license element inside a package.
354*4bfccde5SXin Li     -->
355*4bfccde5SXin Li
356*4bfccde5SXin Li    <xsd:complexType name="usesLicenseType">
357*4bfccde5SXin Li        <xsd:annotation>
358*4bfccde5SXin Li            <xsd:documentation>
359*4bfccde5SXin Li                Describes the license used by a package. The license MUST be defined
360*4bfccde5SXin Li                using a license node and referenced using the ref attribute of the
361*4bfccde5SXin Li                license element inside a package.
362*4bfccde5SXin Li            </xsd:documentation>
363*4bfccde5SXin Li        </xsd:annotation>
364*4bfccde5SXin Li        <xsd:attribute name="ref" type="xsd:IDREF" />
365*4bfccde5SXin Li    </xsd:complexType>
366*4bfccde5SXin Li
367*4bfccde5SXin Li
368*4bfccde5SXin Li    <!-- A collection of files that can be downloaded for a given architecture.
369*4bfccde5SXin Li         The <archives> node is mandatory in the repository elements and the
370*4bfccde5SXin Li         collection must have at least one <archive> declared.
371*4bfccde5SXin Li         Each archive is a zip file that will be unzipped in a location that depends
372*4bfccde5SXin Li         on its package type.
373*4bfccde5SXin Li     -->
374*4bfccde5SXin Li
375*4bfccde5SXin Li    <xsd:complexType name="archivesType">
376*4bfccde5SXin Li        <xsd:annotation>
377*4bfccde5SXin Li            <xsd:documentation>
378*4bfccde5SXin Li                A collection of files that can be downloaded for a given architecture.
379*4bfccde5SXin Li                The &lt;archives&gt; node is mandatory in the repository packages and the
380*4bfccde5SXin Li                collection must have at least one &lt;archive&gt; declared.
381*4bfccde5SXin Li                Each archive is a zip file that will be unzipped in a location that depends
382*4bfccde5SXin Li                on its package type.
383*4bfccde5SXin Li            </xsd:documentation>
384*4bfccde5SXin Li        </xsd:annotation>
385*4bfccde5SXin Li        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
386*4bfccde5SXin Li            <!-- One archive file -->
387*4bfccde5SXin Li            <xsd:element name="archive">
388*4bfccde5SXin Li                <xsd:complexType>
389*4bfccde5SXin Li                    <!-- Properties of the archive file -->
390*4bfccde5SXin Li                    <xsd:all>
391*4bfccde5SXin Li                        <!-- The size in bytes of the archive to download. -->
392*4bfccde5SXin Li                        <xsd:element name="size"     type="xsd:positiveInteger" />
393*4bfccde5SXin Li                        <!-- The checksum of the archive file. -->
394*4bfccde5SXin Li                        <xsd:element name="checksum" type="sdk:checksumType" />
395*4bfccde5SXin Li                        <!-- The URL is an absolute URL if it starts with http://, https://
396*4bfccde5SXin Li                             or ftp://. Otherwise it is relative to the parent directory that
397*4bfccde5SXin Li                             contains this repository.xml -->
398*4bfccde5SXin Li                        <xsd:element name="url"      type="xsd:token" />
399*4bfccde5SXin Li                    </xsd:all>
400*4bfccde5SXin Li
401*4bfccde5SXin Li                    <!-- Attributes that identify the OS and architecture -->
402*4bfccde5SXin Li                    <xsd:attribute name="os" use="required">
403*4bfccde5SXin Li                        <xsd:simpleType>
404*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
405*4bfccde5SXin Li                                <xsd:enumeration value="any" />
406*4bfccde5SXin Li                                <xsd:enumeration value="linux" />
407*4bfccde5SXin Li                                <xsd:enumeration value="macosx" />
408*4bfccde5SXin Li                                <xsd:enumeration value="windows" />
409*4bfccde5SXin Li                            </xsd:restriction>
410*4bfccde5SXin Li                        </xsd:simpleType>
411*4bfccde5SXin Li                    </xsd:attribute>
412*4bfccde5SXin Li                    <xsd:attribute name="arch" use="optional">
413*4bfccde5SXin Li                        <xsd:simpleType>
414*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
415*4bfccde5SXin Li                                <xsd:enumeration value="any" />
416*4bfccde5SXin Li                                <xsd:enumeration value="ppc" />
417*4bfccde5SXin Li                                <xsd:enumeration value="x86" />
418*4bfccde5SXin Li                                <xsd:enumeration value="x86_64" />
419*4bfccde5SXin Li                            </xsd:restriction>
420*4bfccde5SXin Li                        </xsd:simpleType>
421*4bfccde5SXin Li                    </xsd:attribute>
422*4bfccde5SXin Li                </xsd:complexType>
423*4bfccde5SXin Li            </xsd:element>
424*4bfccde5SXin Li        </xsd:sequence>
425*4bfccde5SXin Li    </xsd:complexType>
426*4bfccde5SXin Li
427*4bfccde5SXin Li
428*4bfccde5SXin Li    <!-- A collection of file paths available in an &lt;extra&gt; package
429*4bfccde5SXin Li         that can be installed in an Android project.
430*4bfccde5SXin Li         If present, the &lt;project-files&gt; collection must contain at least one path.
431*4bfccde5SXin Li         Each path is relative to the root directory of the package.
432*4bfccde5SXin Li     -->
433*4bfccde5SXin Li
434*4bfccde5SXin Li    <xsd:complexType name="projectFilesType">
435*4bfccde5SXin Li        <xsd:annotation>
436*4bfccde5SXin Li            <xsd:documentation>
437*4bfccde5SXin Li                A collection of file paths available in an &lt;extra&gt; package
438*4bfccde5SXin Li                that can be installed in an Android project.
439*4bfccde5SXin Li                If present, the &lt;project-files&gt; collection must contain at least one path.
440*4bfccde5SXin Li                Each path is relative to the root directory of the package.
441*4bfccde5SXin Li            </xsd:documentation>
442*4bfccde5SXin Li        </xsd:annotation>
443*4bfccde5SXin Li        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
444*4bfccde5SXin Li            <!-- One JAR Path, relative to the root folder of the package. -->
445*4bfccde5SXin Li            <xsd:element name="path" type="xsd:string" />
446*4bfccde5SXin Li        </xsd:sequence>
447*4bfccde5SXin Li    </xsd:complexType>
448*4bfccde5SXin Li
449*4bfccde5SXin Li
450*4bfccde5SXin Li    <!-- The definition of a file checksum -->
451*4bfccde5SXin Li
452*4bfccde5SXin Li    <xsd:simpleType name="sha1Number">
453*4bfccde5SXin Li        <xsd:annotation>
454*4bfccde5SXin Li            <xsd:documentation>A SHA1 checksum.</xsd:documentation>
455*4bfccde5SXin Li        </xsd:annotation>
456*4bfccde5SXin Li        <xsd:restriction base="xsd:string">
457*4bfccde5SXin Li            <xsd:pattern value="([0-9a-fA-F]){40}"/>
458*4bfccde5SXin Li        </xsd:restriction>
459*4bfccde5SXin Li    </xsd:simpleType>
460*4bfccde5SXin Li
461*4bfccde5SXin Li    <xsd:complexType name="checksumType">
462*4bfccde5SXin Li        <xsd:annotation>
463*4bfccde5SXin Li            <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
464*4bfccde5SXin Li        </xsd:annotation>
465*4bfccde5SXin Li        <xsd:simpleContent>
466*4bfccde5SXin Li            <xsd:extension base="sdk:sha1Number">
467*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="sha1" />
468*4bfccde5SXin Li            </xsd:extension>
469*4bfccde5SXin Li        </xsd:simpleContent>
470*4bfccde5SXin Li    </xsd:complexType>
471*4bfccde5SXin Li
472*4bfccde5SXin Li</xsd:schema>
473