1 <?xml version="1.0" encoding="UTF-8"?>
3 * Copyright (C) 2009 The Android Open Source Project
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 targetNamespace="http://schemas.android.com/sdk/android/repository/1"
19 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20 xmlns:sdk="http://schemas.android.com/sdk/android/repository/1"
21 elementFormDefault="qualified"
22 attributeFormDefault="unqualified"
25 <!-- The repository contains a collection of downloadable items known as
26 "packages". Each package has a type and various attributes and contains
27 a list of file "archives" that can be downloaded for specific OSes.
29 An Android SDK repository is a web site that contains a "repository.xml"
30 file that conforms to this XML Schema.
33 <xsd:element name="sdk-repository">
36 The repository contains collections of downloadable packages.
41 <xsd:choice minOccurs="0" maxOccurs="unbounded">
43 <!-- The definition of an SDK platform package. -->
45 <xsd:element name="platform">
47 <xsd:documentation>An SDK platform package.</xsd:documentation>
51 <!-- The Android platform version. It is string such as "1.0". -->
52 <xsd:element name="version" type="xsd:normalizedString" />
53 <!-- The Android API Level for the platform. An int > 0. -->
54 <xsd:element name="api-level" type="xsd:positiveInteger" />
55 <!-- The optional codename for this platform, if it's a preview. -->
56 <xsd:element name="codename" type="xsd:string" minOccurs="0" />
58 <!-- The revision, an int > 0, incremented each time a new
59 package is generated. -->
60 <xsd:element name="revision" type="xsd:positiveInteger" />
61 <!-- The optional license of this package. If present, users will have
62 to agree to it before downloading. -->
63 <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" />
64 <!-- The optional description of this package. -->
65 <xsd:element name="description" type="xsd:string" minOccurs="0" />
66 <!-- The optional description URL of this package -->
67 <xsd:element name="desc-url" type="xsd:token" minOccurs="0" />
68 <!-- A list of file archives for this package. -->
69 <xsd:element name="archives" type="sdk:archivesType" />
75 <!-- The definition of an SDK Add-on package. -->
77 <xsd:element name="add-on">
79 <xsd:documentation>An SDK add-on package.</xsd:documentation>
83 <!-- The name of the add-on. -->
84 <xsd:element name="name" type="xsd:normalizedString" />
85 <!-- The vendor of the add-on. -->
86 <xsd:element name="vendor" type="xsd:normalizedString" />
87 <!-- The Android API Level for the add-on. An int > 0. -->
88 <xsd:element name="api-level" type="xsd:positiveInteger" />
90 <!-- The revision, an int > 0, incremented each time a new
91 package is generated. -->
92 <xsd:element name="revision" type="xsd:positiveInteger" />
93 <!-- The optional license of this package. If present, users will have
94 to agree to it before downloading. -->
95 <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" />
96 <!-- The optional description of this package. -->
97 <xsd:element name="description" type="xsd:string" minOccurs="0" />
98 <!-- The optional description URL of this package -->
99 <xsd:element name="desc-url" type="xsd:token" minOccurs="0" />
100 <!-- A list of file archives for this package. -->
101 <xsd:element name="archives" type="sdk:archivesType" />
103 <!-- An add-on can declare 0 or more libraries. -->
105 <xsd:element name="libs">
107 <xsd:sequence minOccurs="0" maxOccurs="unbounded">
108 <xsd:element name="lib">
111 <!-- The name of the library. -->
112 <xsd:element name="name" type="xsd:normalizedString" />
113 <!-- The optional description of this add-on library. -->
114 <xsd:element name="description" type="xsd:string" minOccurs="0" />
126 <!-- The definition of an SDK tool package. -->
128 <xsd:element name="tool">
130 <xsd:documentation>An SDK tool package.</xsd:documentation>
134 <!-- The revision, an int > 0, incremented each time a new
135 package is generated. -->
136 <xsd:element name="revision" type="xsd:positiveInteger" />
137 <!-- The optional license of this package. If present, users will have
138 to agree to it before downloading. -->
139 <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" />
140 <!-- The optional description of this package. -->
141 <xsd:element name="description" type="xsd:string" minOccurs="0" />
142 <!-- The optional description URL of this package -->
143 <xsd:element name="desc-url" type="xsd:token" minOccurs="0" />
144 <!-- A list of file archives for this package. -->
145 <xsd:element name="archives" type="sdk:archivesType" />
151 <!-- The definition of an SDK doc package. -->
153 <xsd:element name="doc">
155 <xsd:documentation>An SDK doc package.</xsd:documentation>
159 <!-- The Android API Level for the documentation. An int > 0. -->
160 <xsd:element name="api-level" type="xsd:positiveInteger" />
161 <!-- The optional codename for this doc, if it's a preview. -->
162 <xsd:element name="codename" type="xsd:string" minOccurs="0" />
164 <!-- The revision, an int > 0, incremented each time a new
165 package is generated. -->
166 <xsd:element name="revision" type="xsd:positiveInteger" />
167 <!-- The optional license of this package. If present, users will have
168 to agree to it before downloading. -->
169 <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" />
170 <!-- The optional description of this package. -->
171 <xsd:element name="description" type="xsd:string" minOccurs="0" />
172 <!-- The optional description URL of this package -->
173 <xsd:element name="desc-url" type="xsd:token" minOccurs="0" />
174 <!-- A list of file archives for this package. -->
175 <xsd:element name="archives" type="sdk:archivesType" />
181 <!-- The definition of an SDK extra package. This kind of package is for
182 "free" content and specifies in which fixed root directory it must be
186 <xsd:element name="extra">
189 An SDK extra package. This kind of package is for "free"
190 content and specifies in which fixed root directory it must be
192 The paths "add-ons", "platforms", "tools" and "docs" are
193 reserved and cannot be used.
198 <!-- The install folder name. It must be a single-segment path.
199 The paths "add-ons", "platforms", "tools" and "docs" are
200 reserved and cannot be used.
202 <xsd:element name="path">
204 <xsd:restriction base="xsd:token">
205 <xsd:pattern value="[^/\\]+"/>
210 <!-- The revision, an int > 0, incremented each time a new
211 package is generated. -->
212 <xsd:element name="revision" type="xsd:positiveInteger" />
213 <!-- The optional license of this package. If present, users will have
214 to agree to it before downloading. -->
215 <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" />
216 <!-- The optional description of this package. -->
217 <xsd:element name="description" type="xsd:string" minOccurs="0" />
218 <!-- The optional description URL of this package -->
219 <xsd:element name="desc-url" type="xsd:token" minOccurs="0" />
220 <!-- A list of file archives for this package. -->
221 <xsd:element name="archives" type="sdk:archivesType" />
228 <!-- The definition of a license to be referenced by the uses-license element. -->
230 <xsd:element name="license">
233 A license definition. Such a license must be used later as a reference
234 using a uses-license element in one of the package elements.
239 <xsd:extension base="xsd:string">
240 <xsd:attribute name="id" type="xsd:ID" />
241 <xsd:attribute name="type" type="xsd:token" fixed="text" />
251 <!-- Type describing the license used by a package.
252 The license MUST be defined using a license node and referenced
253 using the ref attribute of the license element inside a package.
256 <xsd:complexType name="licenseType">
259 Describes the license used by a package. The license MUST be defined
260 using a license node and referenced using the ref attribute of the
261 license element inside a package.
264 <xsd:attribute name="ref" type="xsd:IDREF" />
268 <!-- A collection of files that can be downloaded for a given architecture.
269 The <archives> node is mandatory in the repository elements and the
270 collection must have at least one <archive> declared.
271 Each archive is a zip file that will be unzipped in a location that depends
275 <xsd:complexType name="archivesType">
278 A collection of files that can be downloaded for a given architecture.
279 The <archives> node is mandatory in the repository packages and the
280 collection must have at least one <archive> declared.
281 Each archive is a zip file that will be unzipped in a location that depends
285 <xsd:sequence minOccurs="1" maxOccurs="unbounded">
286 <!-- One archive file -->
287 <xsd:element name="archive">
289 <!-- Properties of the archive file -->
291 <!-- The size in bytes of the archive to download. -->
292 <xsd:element name="size" type="xsd:positiveInteger" />
293 <!-- The checksum of the archive file. -->
294 <xsd:element name="checksum" type="sdk:checksumType" />
295 <!-- The URL is an absolute URL if it starts with http://, https://
296 or ftp://. Otherwise it is relative to the parent directory that
297 contains this repository.xml -->
298 <xsd:element name="url" type="xsd:token" />
301 <!-- Attributes that identify the OS and architecture -->
302 <xsd:attribute name="os" use="required">
304 <xsd:restriction base="xsd:token">
305 <xsd:enumeration value="any" />
306 <xsd:enumeration value="linux" />
307 <xsd:enumeration value="macosx" />
308 <xsd:enumeration value="windows" />
312 <xsd:attribute name="arch" use="optional">
314 <xsd:restriction base="xsd:token">
315 <xsd:enumeration value="any" />
316 <xsd:enumeration value="ppc" />
317 <xsd:enumeration value="x86" />
318 <xsd:enumeration value="x86_64" />
328 <!-- The definition of a file checksum -->
330 <xsd:simpleType name="sha1Number">
332 <xsd:documentation>A SHA1 checksum.</xsd:documentation>
334 <xsd:restriction base="xsd:string">
335 <xsd:pattern value="([0-9a-fA-F]){40}"/>
339 <xsd:complexType name="checksumType">
341 <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
344 <xsd:extension base="sdk:sha1Number">
345 <xsd:attribute name="type" type="xsd:token" fixed="sha1" />