xref: /aosp_15_r20/prebuilts/devtools/repository/sdk-sys-img-03.xsd (revision 4bfccde5c7e9ea06f821db40ef0af54f6695c320)
1*4bfccde5SXin Li<?xml version="1.0" encoding="UTF-8"?>
2*4bfccde5SXin Li<!--
3*4bfccde5SXin Li * Copyright (C) 2012 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/sys-img/3"
19*4bfccde5SXin Li    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20*4bfccde5SXin Li    xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/3"
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 r20.0. It is split out of the
34*4bfccde5SXin Li           main SDK Repository XML Schema and can only contain <system-image> packages.
35*4bfccde5SXin Li
36*4bfccde5SXin Li         - v2 is used by the SDK Manager in Tools r22.6.
37*4bfccde5SXin Li           It introduces a sub-tag for the <system-image> repository type.
38*4bfccde5SXin Li
39*4bfccde5SXin Li         - v3 is used by the SDK Manager in Tools r22.6.4:
40*4bfccde5SXin Li            - It introduces a <list-display> string for all package types.
41*4bfccde5SXin Li            - it changes <archive os=... arch=...> to sub-elements: <host-os>, <host-bits>,
42*4bfccde5SXin Li              <jvm-bits> and <min-jvm-version>.
43*4bfccde5SXin Li            - Support for new ABIs arm64-v8a, x86_64 and mips64.
44*4bfccde5SXin Li            - Support for new <addon><vendor-id/name></addon> element.
45*4bfccde5SXin Li    -->
46*4bfccde5SXin Li
47*4bfccde5SXin Li    <xsd:element name="sdk-sys-img" type="sdk:repositoryType" />
48*4bfccde5SXin Li
49*4bfccde5SXin Li    <xsd:complexType name="repositoryType">
50*4bfccde5SXin Li        <xsd:annotation>
51*4bfccde5SXin Li            <xsd:documentation>
52*4bfccde5SXin Li                The repository contains a collection of downloadable system images.
53*4bfccde5SXin Li            </xsd:documentation>
54*4bfccde5SXin Li        </xsd:annotation>
55*4bfccde5SXin Li        <xsd:choice minOccurs="0" maxOccurs="unbounded">
56*4bfccde5SXin Li            <xsd:element name="system-image"    type="sdk:systemImageType"  />
57*4bfccde5SXin Li            <xsd:element name="license"         type="sdk:licenseType"      />
58*4bfccde5SXin Li        </xsd:choice>
59*4bfccde5SXin Li    </xsd:complexType>
60*4bfccde5SXin Li
61*4bfccde5SXin Li
62*4bfccde5SXin Li    <!-- The definition of a system image used by a platform. -->
63*4bfccde5SXin Li
64*4bfccde5SXin Li    <xsd:complexType name="systemImageType" >
65*4bfccde5SXin Li        <xsd:annotation>
66*4bfccde5SXin Li            <xsd:documentation>
67*4bfccde5SXin Li                System Image for a platform.
68*4bfccde5SXin Li            </xsd:documentation>
69*4bfccde5SXin Li        </xsd:annotation>
70*4bfccde5SXin Li        <xsd:all>
71*4bfccde5SXin Li            <!-- api-level+codename identifies the platform to which this system image belongs. -->
72*4bfccde5SXin Li
73*4bfccde5SXin Li            <!-- The Android API Level for the platform. An int > 0. -->
74*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
75*4bfccde5SXin Li            <!-- The optional codename for this platform, if it's a preview. -->
76*4bfccde5SXin Li            <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
77*4bfccde5SXin Li
78*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
79*4bfccde5SXin Li                 package is generated. -->
80*4bfccde5SXin Li            <xsd:element name="revision"  type="xsd:positiveInteger" />
81*4bfccde5SXin Li
82*4bfccde5SXin Li            <!-- The tag of the system emulated by this image. -->
83*4bfccde5SXin Li            <xsd:element name="tag-id"      type="sdk:idType" />
84*4bfccde5SXin Li            <!-- The displayed tag of the system emulated by this image. Optional. -->
85*4bfccde5SXin Li            <xsd:element name="tag-display" type="xsd:normalizedString" minOccurs="0" />
86*4bfccde5SXin Li
87*4bfccde5SXin Li            <!-- Indicates a system-image is tied to an add-on and which one.
88*4bfccde5SXin Li                 Mandatory for add-on system-images.
89*4bfccde5SXin Li                 Must not be present for platform system-images. -->
90*4bfccde5SXin Li            <xsd:element name="add-on"      type="sdk:addonType" minOccurs="0" />
91*4bfccde5SXin Li
92*4bfccde5SXin Li            <!-- The vendor id of the system-image when it is associated with an add-on.
93*4bfccde5SXin Li                 Must not be present for system-image associated with a platform. -->
94*4bfccde5SXin Li            <xsd:element name="vendor-id"       type="sdk:idType" minOccurs="0" />
95*4bfccde5SXin Li            <!-- The displayed vendor name of the system-image's add-on. -->
96*4bfccde5SXin Li            <xsd:element name="vendor-display"  type="xsd:normalizedString" minOccurs="0" />
97*4bfccde5SXin Li
98*4bfccde5SXin Li            <!-- The optional display list item. When missing, it is auto-computed. -->
99*4bfccde5SXin Li            <xsd:element name="list-display"   type="xsd:normalizedString" minOccurs="0" />
100*4bfccde5SXin Li
101*4bfccde5SXin Li            <!-- The ABI of the system emulated by this image. -->
102*4bfccde5SXin Li            <xsd:element name="abi"       type="sdk:abiType" />
103*4bfccde5SXin Li
104*4bfccde5SXin Li            <!-- The optional license of this package. If present, users will have
105*4bfccde5SXin Li                 to agree to it before downloading. -->
106*4bfccde5SXin Li            <xsd:element name="uses-license"  type="sdk:usesLicenseType" minOccurs="0" />
107*4bfccde5SXin Li            <!-- The optional description of this package. -->
108*4bfccde5SXin Li            <xsd:element name="description"   type="xsd:string"      minOccurs="0" />
109*4bfccde5SXin Li            <!-- The optional description URL of this package -->
110*4bfccde5SXin Li            <xsd:element name="desc-url"      type="xsd:token"       minOccurs="0" />
111*4bfccde5SXin Li            <!-- The optional release note for this package. -->
112*4bfccde5SXin Li            <xsd:element name="release-note"  type="xsd:string"      minOccurs="0" />
113*4bfccde5SXin Li            <!-- The optional release note URL of this package -->
114*4bfccde5SXin Li            <xsd:element name="release-url"   type="xsd:token"       minOccurs="0" />
115*4bfccde5SXin Li
116*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
117*4bfccde5SXin Li            <xsd:element name="archives"  type="sdk:archivesType" />
118*4bfccde5SXin Li
119*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
120*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
121*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
122*4bfccde5SXin Li        </xsd:all>
123*4bfccde5SXin Li    </xsd:complexType>
124*4bfccde5SXin Li
125*4bfccde5SXin Li
126*4bfccde5SXin Li    <!-- The definition of a system image used by a platform. -->
127*4bfccde5SXin Li
128*4bfccde5SXin Li    <xsd:complexType name="addonType" >
129*4bfccde5SXin Li        <xsd:annotation>
130*4bfccde5SXin Li            <xsd:documentation>
131*4bfccde5SXin Li                Indicates a system-image is tied to an add-on and which one
132*4bfccde5SXin Li                (the combo tag-id + vendor-id uniquely identifies the add-on.)
133*4bfccde5SXin Li                Mandatory for add-on system-images.
134*4bfccde5SXin Li                Must not be present for platform system-images.
135*4bfccde5SXin Li            </xsd:documentation>
136*4bfccde5SXin Li        </xsd:annotation>
137*4bfccde5SXin Li        <xsd:all>
138*4bfccde5SXin Li            <!-- The vendor id of the add-on. -->
139*4bfccde5SXin Li            <xsd:element name="vendor-id"       type="sdk:idType" />
140*4bfccde5SXin Li            <!-- The displayed vendor name of the add-on. -->
141*4bfccde5SXin Li            <xsd:element name="vendor-display"  type="xsd:normalizedString" minOccurs="0" />
142*4bfccde5SXin Li        </xsd:all>
143*4bfccde5SXin Li    </xsd:complexType>
144*4bfccde5SXin Li
145*4bfccde5SXin Li
146*4bfccde5SXin Li    <xsd:simpleType name="idType">
147*4bfccde5SXin Li        <xsd:annotation>
148*4bfccde5SXin Li            <xsd:documentation>
149*4bfccde5SXin Li                An tag string for a system image can only be simple alphanumeric string.
150*4bfccde5SXin Li            </xsd:documentation>
151*4bfccde5SXin Li        </xsd:annotation>
152*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
153*4bfccde5SXin Li            <xsd:pattern value="[a-zA-Z0-9_-]+"/>
154*4bfccde5SXin Li        </xsd:restriction>
155*4bfccde5SXin Li    </xsd:simpleType>
156*4bfccde5SXin Li
157*4bfccde5SXin Li
158*4bfccde5SXin Li    <!-- The definition of the ABI supported by a platform's system image. -->
159*4bfccde5SXin Li
160*4bfccde5SXin Li    <xsd:simpleType name="abiType">
161*4bfccde5SXin Li        <xsd:annotation>
162*4bfccde5SXin Li            <xsd:documentation>The ABI of a platform's system image.</xsd:documentation>
163*4bfccde5SXin Li        </xsd:annotation>
164*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
165*4bfccde5SXin Li            <xsd:enumeration value="armeabi"     />
166*4bfccde5SXin Li            <xsd:enumeration value="armeabi-v7a" />
167*4bfccde5SXin Li            <xsd:enumeration value="arm64-v8a"   />
168*4bfccde5SXin Li            <xsd:enumeration value="x86"         />
169*4bfccde5SXin Li            <xsd:enumeration value="x86_64"      />
170*4bfccde5SXin Li            <xsd:enumeration value="mips"        />
171*4bfccde5SXin Li            <xsd:enumeration value="mips64"      />
172*4bfccde5SXin Li        </xsd:restriction>
173*4bfccde5SXin Li    </xsd:simpleType>
174*4bfccde5SXin Li
175*4bfccde5SXin Li
176*4bfccde5SXin Li    <!-- The definition of a license to be referenced by the uses-license element. -->
177*4bfccde5SXin Li
178*4bfccde5SXin Li    <xsd:complexType name="licenseType">
179*4bfccde5SXin Li        <xsd:annotation>
180*4bfccde5SXin Li            <xsd:documentation>
181*4bfccde5SXin Li                A license definition. Such a license must be used later as a reference
182*4bfccde5SXin Li                using a uses-license element in one of the package elements.
183*4bfccde5SXin Li            </xsd:documentation>
184*4bfccde5SXin Li        </xsd:annotation>
185*4bfccde5SXin Li        <xsd:simpleContent>
186*4bfccde5SXin Li            <xsd:extension base="xsd:string">
187*4bfccde5SXin Li                <xsd:attribute name="id"   type="xsd:ID" />
188*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="text" />
189*4bfccde5SXin Li            </xsd:extension>
190*4bfccde5SXin Li        </xsd:simpleContent>
191*4bfccde5SXin Li    </xsd:complexType>
192*4bfccde5SXin Li
193*4bfccde5SXin Li
194*4bfccde5SXin Li    <!-- Type describing the license used by a package.
195*4bfccde5SXin Li         The license MUST be defined using a license node and referenced
196*4bfccde5SXin Li         using the ref attribute of the license element inside a package.
197*4bfccde5SXin Li     -->
198*4bfccde5SXin Li
199*4bfccde5SXin Li    <xsd:complexType name="usesLicenseType">
200*4bfccde5SXin Li        <xsd:annotation>
201*4bfccde5SXin Li            <xsd:documentation>
202*4bfccde5SXin Li                Describes the license used by a package. The license MUST be defined
203*4bfccde5SXin Li                using a license node and referenced using the ref attribute of the
204*4bfccde5SXin Li                license element inside a package.
205*4bfccde5SXin Li            </xsd:documentation>
206*4bfccde5SXin Li        </xsd:annotation>
207*4bfccde5SXin Li        <xsd:attribute name="ref" type="xsd:IDREF" />
208*4bfccde5SXin Li    </xsd:complexType>
209*4bfccde5SXin Li
210*4bfccde5SXin Li
211*4bfccde5SXin Li    <!-- A collection of files that can be downloaded for a given architecture.
212*4bfccde5SXin Li         The <archives> node is mandatory in the repository elements and the
213*4bfccde5SXin Li         collection must have at least one <archive> declared.
214*4bfccde5SXin Li         Each archive is a zip file that will be unzipped in a location that depends
215*4bfccde5SXin Li         on its package type.
216*4bfccde5SXin Li     -->
217*4bfccde5SXin Li
218*4bfccde5SXin Li    <xsd:complexType name="archivesType">
219*4bfccde5SXin Li        <xsd:annotation>
220*4bfccde5SXin Li            <xsd:documentation>
221*4bfccde5SXin Li                A collection of files that can be downloaded for a given architecture.
222*4bfccde5SXin Li                The &lt;archives&gt; node is mandatory in the repository packages and the
223*4bfccde5SXin Li                collection must have at least one &lt;archive&gt; declared.
224*4bfccde5SXin Li                Each archive is a zip file that will be unzipped in a location that depends
225*4bfccde5SXin Li                on its package type.
226*4bfccde5SXin Li            </xsd:documentation>
227*4bfccde5SXin Li        </xsd:annotation>
228*4bfccde5SXin Li        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
229*4bfccde5SXin Li            <!-- One archive file -->
230*4bfccde5SXin Li            <xsd:element name="archive">
231*4bfccde5SXin Li                <xsd:complexType>
232*4bfccde5SXin Li                    <!-- Properties of the archive file -->
233*4bfccde5SXin Li                    <xsd:all>
234*4bfccde5SXin Li                        <!-- The size in bytes of the archive to download. -->
235*4bfccde5SXin Li                        <xsd:element name="size"     type="xsd:positiveInteger" />
236*4bfccde5SXin Li                        <!-- The checksum of the archive file. -->
237*4bfccde5SXin Li                        <xsd:element name="checksum" type="sdk:checksumType" />
238*4bfccde5SXin Li                        <!-- The URL is an absolute URL if it starts with http://, https://
239*4bfccde5SXin Li                             or ftp://. Otherwise it is relative to the parent directory that
240*4bfccde5SXin Li                             contains this repository.xml -->
241*4bfccde5SXin Li                        <xsd:element name="url"      type="xsd:token" />
242*4bfccde5SXin Li
243*4bfccde5SXin Li                        <xsd:element name="host-os"         type="sdk:osType"         minOccurs="0" />
244*4bfccde5SXin Li                        <xsd:element name="host-bits"       type="sdk:bitSizeType"    minOccurs="0" />
245*4bfccde5SXin Li                        <xsd:element name="jvm-bits"        type="sdk:bitSizeType"    minOccurs="0" />
246*4bfccde5SXin Li                        <xsd:element name="min-jvm-version" type="sdk:jvmVersionType" minOccurs="0" />
247*4bfccde5SXin Li                    </xsd:all>
248*4bfccde5SXin Li                </xsd:complexType>
249*4bfccde5SXin Li            </xsd:element>
250*4bfccde5SXin Li        </xsd:sequence>
251*4bfccde5SXin Li    </xsd:complexType>
252*4bfccde5SXin Li
253*4bfccde5SXin Li
254*4bfccde5SXin Li    <!-- The definition of archive filters -->
255*4bfccde5SXin Li
256*4bfccde5SXin Li    <xsd:simpleType name="bitSizeType">
257*4bfccde5SXin Li        <xsd:annotation>
258*4bfccde5SXin Li            <xsd:documentation>A CPU bit size filter.</xsd:documentation>
259*4bfccde5SXin Li        </xsd:annotation>
260*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
261*4bfccde5SXin Li            <xsd:enumeration value="32" />
262*4bfccde5SXin Li            <xsd:enumeration value="64" />
263*4bfccde5SXin Li        </xsd:restriction>
264*4bfccde5SXin Li    </xsd:simpleType>
265*4bfccde5SXin Li
266*4bfccde5SXin Li    <xsd:simpleType name="osType">
267*4bfccde5SXin Li        <xsd:annotation>
268*4bfccde5SXin Li            <xsd:documentation>A host OS filter.</xsd:documentation>
269*4bfccde5SXin Li        </xsd:annotation>
270*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
271*4bfccde5SXin Li            <xsd:enumeration value="linux" />
272*4bfccde5SXin Li            <xsd:enumeration value="macosx" />
273*4bfccde5SXin Li            <xsd:enumeration value="windows" />
274*4bfccde5SXin Li        </xsd:restriction>
275*4bfccde5SXin Li    </xsd:simpleType>
276*4bfccde5SXin Li
277*4bfccde5SXin Li    <xsd:simpleType name="jvmVersionType">
278*4bfccde5SXin Li        <xsd:annotation>
279*4bfccde5SXin Li            <xsd:documentation>A JVM version number, e.g. "1" or "1.6" or "1.14.15".</xsd:documentation>
280*4bfccde5SXin Li        </xsd:annotation>
281*4bfccde5SXin Li        <xsd:restriction base="xsd:string">
282*4bfccde5SXin Li            <xsd:pattern value="([1-9](\.[1-9]{1,2}){0,2})"/>
283*4bfccde5SXin Li        </xsd:restriction>
284*4bfccde5SXin Li    </xsd:simpleType>
285*4bfccde5SXin Li
286*4bfccde5SXin Li
287*4bfccde5SXin Li    <!-- The definition of a file checksum -->
288*4bfccde5SXin Li
289*4bfccde5SXin Li    <xsd:simpleType name="sha1Number">
290*4bfccde5SXin Li        <xsd:annotation>
291*4bfccde5SXin Li            <xsd:documentation>A SHA1 checksum.</xsd:documentation>
292*4bfccde5SXin Li        </xsd:annotation>
293*4bfccde5SXin Li        <xsd:restriction base="xsd:string">
294*4bfccde5SXin Li            <xsd:pattern value="([0-9a-fA-F]){40}"/>
295*4bfccde5SXin Li        </xsd:restriction>
296*4bfccde5SXin Li    </xsd:simpleType>
297*4bfccde5SXin Li
298*4bfccde5SXin Li    <xsd:complexType name="checksumType">
299*4bfccde5SXin Li        <xsd:annotation>
300*4bfccde5SXin Li            <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
301*4bfccde5SXin Li        </xsd:annotation>
302*4bfccde5SXin Li        <xsd:simpleContent>
303*4bfccde5SXin Li            <xsd:extension base="sdk:sha1Number">
304*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="sha1" />
305*4bfccde5SXin Li            </xsd:extension>
306*4bfccde5SXin Li        </xsd:simpleContent>
307*4bfccde5SXin Li    </xsd:complexType>
308*4bfccde5SXin Li
309*4bfccde5SXin Li</xsd:schema>
310