xref: /aosp_15_r20/prebuilts/devtools/repository/sdk-sys-img-01.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/1"
19*4bfccde5SXin Li    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20*4bfccde5SXin Li    xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/1"
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
37*4bfccde5SXin Li    <xsd:element name="sdk-sys-img" type="sdk:repositoryType" />
38*4bfccde5SXin Li
39*4bfccde5SXin Li    <xsd:complexType name="repositoryType">
40*4bfccde5SXin Li        <xsd:annotation>
41*4bfccde5SXin Li            <xsd:documentation>
42*4bfccde5SXin Li                The repository contains a collection of downloadable system images.
43*4bfccde5SXin Li            </xsd:documentation>
44*4bfccde5SXin Li        </xsd:annotation>
45*4bfccde5SXin Li        <xsd:choice minOccurs="0" maxOccurs="unbounded">
46*4bfccde5SXin Li            <xsd:element name="system-image"    type="sdk:systemImageType"  />
47*4bfccde5SXin Li            <xsd:element name="license"         type="sdk:licenseType"      />
48*4bfccde5SXin Li        </xsd:choice>
49*4bfccde5SXin Li    </xsd:complexType>
50*4bfccde5SXin Li
51*4bfccde5SXin Li
52*4bfccde5SXin Li    <!-- The definition of a system image used by a platform. -->
53*4bfccde5SXin Li
54*4bfccde5SXin Li    <xsd:complexType name="systemImageType" >
55*4bfccde5SXin Li        <xsd:annotation>
56*4bfccde5SXin Li            <xsd:documentation>
57*4bfccde5SXin Li                System Image for a platform.
58*4bfccde5SXin Li            </xsd:documentation>
59*4bfccde5SXin Li        </xsd:annotation>
60*4bfccde5SXin Li        <xsd:all>
61*4bfccde5SXin Li            <!-- api-level+codename identifies the platform to which this system image belongs. -->
62*4bfccde5SXin Li
63*4bfccde5SXin Li            <!-- The Android API Level for the platform. An int > 0. -->
64*4bfccde5SXin Li            <xsd:element name="api-level" type="xsd:positiveInteger"  />
65*4bfccde5SXin Li            <!-- The optional codename for this platform, if it's a preview. -->
66*4bfccde5SXin Li            <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
67*4bfccde5SXin Li
68*4bfccde5SXin Li            <!-- The revision, an int > 0, incremented each time a new
69*4bfccde5SXin Li                 package is generated. -->
70*4bfccde5SXin Li            <xsd:element name="revision"  type="xsd:positiveInteger" />
71*4bfccde5SXin Li
72*4bfccde5SXin Li            <!-- The ABI of the system emulated by this image. -->
73*4bfccde5SXin Li            <xsd:element name="abi"       type="sdk:abiType" />
74*4bfccde5SXin Li
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="sdk: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
87*4bfccde5SXin Li            <!-- A list of file archives for this package. -->
88*4bfccde5SXin Li            <xsd:element name="archives"  type="sdk:archivesType" />
89*4bfccde5SXin Li
90*4bfccde5SXin Li            <!-- An optional element indicating the package is obsolete.
91*4bfccde5SXin Li                 The string content is however currently not defined and ignored. -->
92*4bfccde5SXin Li            <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
93*4bfccde5SXin Li        </xsd:all>
94*4bfccde5SXin Li    </xsd:complexType>
95*4bfccde5SXin Li
96*4bfccde5SXin Li
97*4bfccde5SXin Li    <!-- The definition of the ABI supported by a platform's system image. -->
98*4bfccde5SXin Li
99*4bfccde5SXin Li    <xsd:simpleType name="abiType">
100*4bfccde5SXin Li        <xsd:annotation>
101*4bfccde5SXin Li            <xsd:documentation>The ABI of a platform's system image.</xsd:documentation>
102*4bfccde5SXin Li        </xsd:annotation>
103*4bfccde5SXin Li        <xsd:restriction base="xsd:token">
104*4bfccde5SXin Li            <xsd:enumeration value="armeabi"     />
105*4bfccde5SXin Li            <xsd:enumeration value="armeabi-v7a" />
106*4bfccde5SXin Li            <xsd:enumeration value="x86"         />
107*4bfccde5SXin Li            <xsd:enumeration value="mips"        />
108*4bfccde5SXin Li        </xsd:restriction>
109*4bfccde5SXin Li    </xsd:simpleType>
110*4bfccde5SXin Li
111*4bfccde5SXin Li
112*4bfccde5SXin Li    <!-- The definition of a license to be referenced by the uses-license element. -->
113*4bfccde5SXin Li
114*4bfccde5SXin Li    <xsd:complexType name="licenseType">
115*4bfccde5SXin Li        <xsd:annotation>
116*4bfccde5SXin Li            <xsd:documentation>
117*4bfccde5SXin Li                A license definition. Such a license must be used later as a reference
118*4bfccde5SXin Li                using a uses-license element in one of the package elements.
119*4bfccde5SXin Li            </xsd:documentation>
120*4bfccde5SXin Li        </xsd:annotation>
121*4bfccde5SXin Li        <xsd:simpleContent>
122*4bfccde5SXin Li            <xsd:extension base="xsd:string">
123*4bfccde5SXin Li                <xsd:attribute name="id"   type="xsd:ID" />
124*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="text" />
125*4bfccde5SXin Li            </xsd:extension>
126*4bfccde5SXin Li        </xsd:simpleContent>
127*4bfccde5SXin Li    </xsd:complexType>
128*4bfccde5SXin Li
129*4bfccde5SXin Li
130*4bfccde5SXin Li    <!-- Type describing the license used by a package.
131*4bfccde5SXin Li         The license MUST be defined using a license node and referenced
132*4bfccde5SXin Li         using the ref attribute of the license element inside a package.
133*4bfccde5SXin Li     -->
134*4bfccde5SXin Li
135*4bfccde5SXin Li    <xsd:complexType name="usesLicenseType">
136*4bfccde5SXin Li        <xsd:annotation>
137*4bfccde5SXin Li            <xsd:documentation>
138*4bfccde5SXin Li                Describes the license used by a package. The license MUST be defined
139*4bfccde5SXin Li                using a license node and referenced using the ref attribute of the
140*4bfccde5SXin Li                license element inside a package.
141*4bfccde5SXin Li            </xsd:documentation>
142*4bfccde5SXin Li        </xsd:annotation>
143*4bfccde5SXin Li        <xsd:attribute name="ref" type="xsd:IDREF" />
144*4bfccde5SXin Li    </xsd:complexType>
145*4bfccde5SXin Li
146*4bfccde5SXin Li
147*4bfccde5SXin Li    <!-- A collection of files that can be downloaded for a given architecture.
148*4bfccde5SXin Li         The <archives> node is mandatory in the repository elements and the
149*4bfccde5SXin Li         collection must have at least one <archive> declared.
150*4bfccde5SXin Li         Each archive is a zip file that will be unzipped in a location that depends
151*4bfccde5SXin Li         on its package type.
152*4bfccde5SXin Li     -->
153*4bfccde5SXin Li
154*4bfccde5SXin Li    <xsd:complexType name="archivesType">
155*4bfccde5SXin Li        <xsd:annotation>
156*4bfccde5SXin Li            <xsd:documentation>
157*4bfccde5SXin Li                A collection of files that can be downloaded for a given architecture.
158*4bfccde5SXin Li                The &lt;archives&gt; node is mandatory in the repository packages and the
159*4bfccde5SXin Li                collection must have at least one &lt;archive&gt; declared.
160*4bfccde5SXin Li                Each archive is a zip file that will be unzipped in a location that depends
161*4bfccde5SXin Li                on its package type.
162*4bfccde5SXin Li            </xsd:documentation>
163*4bfccde5SXin Li        </xsd:annotation>
164*4bfccde5SXin Li        <xsd:sequence minOccurs="1" maxOccurs="unbounded">
165*4bfccde5SXin Li            <!-- One archive file -->
166*4bfccde5SXin Li            <xsd:element name="archive">
167*4bfccde5SXin Li                <xsd:complexType>
168*4bfccde5SXin Li                    <!-- Properties of the archive file -->
169*4bfccde5SXin Li                    <xsd:all>
170*4bfccde5SXin Li                        <!-- The size in bytes of the archive to download. -->
171*4bfccde5SXin Li                        <xsd:element name="size"     type="xsd:positiveInteger" />
172*4bfccde5SXin Li                        <!-- The checksum of the archive file. -->
173*4bfccde5SXin Li                        <xsd:element name="checksum" type="sdk:checksumType" />
174*4bfccde5SXin Li                        <!-- The URL is an absolute URL if it starts with http://, https://
175*4bfccde5SXin Li                             or ftp://. Otherwise it is relative to the parent directory that
176*4bfccde5SXin Li                             contains this repository.xml -->
177*4bfccde5SXin Li                        <xsd:element name="url"      type="xsd:token" />
178*4bfccde5SXin Li                    </xsd:all>
179*4bfccde5SXin Li
180*4bfccde5SXin Li                    <!-- Attributes that identify the OS and architecture -->
181*4bfccde5SXin Li                    <xsd:attribute name="os" use="required">
182*4bfccde5SXin Li                        <xsd:simpleType>
183*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
184*4bfccde5SXin Li                                <xsd:enumeration value="any" />
185*4bfccde5SXin Li                                <xsd:enumeration value="linux" />
186*4bfccde5SXin Li                                <xsd:enumeration value="macosx" />
187*4bfccde5SXin Li                                <xsd:enumeration value="windows" />
188*4bfccde5SXin Li                            </xsd:restriction>
189*4bfccde5SXin Li                        </xsd:simpleType>
190*4bfccde5SXin Li                    </xsd:attribute>
191*4bfccde5SXin Li                    <xsd:attribute name="arch" use="optional">
192*4bfccde5SXin Li                        <xsd:simpleType>
193*4bfccde5SXin Li                            <xsd:restriction base="xsd:token">
194*4bfccde5SXin Li                                <xsd:enumeration value="any" />
195*4bfccde5SXin Li                                <xsd:enumeration value="ppc" />
196*4bfccde5SXin Li                                <xsd:enumeration value="x86" />
197*4bfccde5SXin Li                                <xsd:enumeration value="x86_64" />
198*4bfccde5SXin Li                            </xsd:restriction>
199*4bfccde5SXin Li                        </xsd:simpleType>
200*4bfccde5SXin Li                    </xsd:attribute>
201*4bfccde5SXin Li                </xsd:complexType>
202*4bfccde5SXin Li            </xsd:element>
203*4bfccde5SXin Li        </xsd:sequence>
204*4bfccde5SXin Li    </xsd:complexType>
205*4bfccde5SXin Li
206*4bfccde5SXin Li
207*4bfccde5SXin Li    <!-- The definition of a file checksum -->
208*4bfccde5SXin Li
209*4bfccde5SXin Li    <xsd:simpleType name="sha1Number">
210*4bfccde5SXin Li        <xsd:annotation>
211*4bfccde5SXin Li            <xsd:documentation>A SHA1 checksum.</xsd:documentation>
212*4bfccde5SXin Li        </xsd:annotation>
213*4bfccde5SXin Li        <xsd:restriction base="xsd:string">
214*4bfccde5SXin Li            <xsd:pattern value="([0-9a-fA-F]){40}"/>
215*4bfccde5SXin Li        </xsd:restriction>
216*4bfccde5SXin Li    </xsd:simpleType>
217*4bfccde5SXin Li
218*4bfccde5SXin Li    <xsd:complexType name="checksumType">
219*4bfccde5SXin Li        <xsd:annotation>
220*4bfccde5SXin Li            <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
221*4bfccde5SXin Li        </xsd:annotation>
222*4bfccde5SXin Li        <xsd:simpleContent>
223*4bfccde5SXin Li            <xsd:extension base="sdk:sha1Number">
224*4bfccde5SXin Li                <xsd:attribute name="type" type="xsd:token" fixed="sha1" />
225*4bfccde5SXin Li            </xsd:extension>
226*4bfccde5SXin Li        </xsd:simpleContent>
227*4bfccde5SXin Li    </xsd:complexType>
228*4bfccde5SXin Li
229*4bfccde5SXin Li</xsd:schema>
230