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