1*4bfccde5SXin Li<?xml version="1.0" encoding="UTF-8"?> 2*4bfccde5SXin Li<!-- 3*4bfccde5SXin Li * Copyright (C) 2010 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/1" 19*4bfccde5SXin Li xmlns:xsd="http://www.w3.org/2001/XMLSchema" 20*4bfccde5SXin Li xmlns:sdk="http://schemas.android.com/sdk/android/addon/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 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 38*4bfccde5SXin Li <xsd:element name="sdk-addon" type="sdk:repositoryType" /> 39*4bfccde5SXin Li 40*4bfccde5SXin Li <xsd:complexType name="repositoryType"> 41*4bfccde5SXin Li <xsd:annotation> 42*4bfccde5SXin Li <xsd:documentation> 43*4bfccde5SXin Li The repository contains a collection of downloadable packages. 44*4bfccde5SXin Li </xsd:documentation> 45*4bfccde5SXin Li </xsd:annotation> 46*4bfccde5SXin Li <xsd:choice minOccurs="0" maxOccurs="unbounded"> 47*4bfccde5SXin Li <xsd:element name="add-on" type="sdk:addonType" /> 48*4bfccde5SXin Li <xsd:element name="extra" type="sdk:extraType" /> 49*4bfccde5SXin Li <xsd:element name="license" type="sdk:licenseType" /> 50*4bfccde5SXin Li </xsd:choice> 51*4bfccde5SXin Li </xsd:complexType> 52*4bfccde5SXin Li 53*4bfccde5SXin Li <!-- The definition of an SDK Add-on package. --> 54*4bfccde5SXin Li 55*4bfccde5SXin Li <xsd:complexType name="addonType"> 56*4bfccde5SXin Li <xsd:annotation> 57*4bfccde5SXin Li <xsd:documentation>An SDK add-on package.</xsd:documentation> 58*4bfccde5SXin Li </xsd:annotation> 59*4bfccde5SXin Li <xsd:all> 60*4bfccde5SXin Li <!-- The name of the add-on. --> 61*4bfccde5SXin Li <xsd:element name="name" type="xsd:normalizedString" /> 62*4bfccde5SXin Li <!-- The vendor of the add-on. --> 63*4bfccde5SXin Li <xsd:element name="vendor" type="xsd:normalizedString" /> 64*4bfccde5SXin Li <!-- The Android API Level for the add-on. An int > 0. --> 65*4bfccde5SXin Li <xsd:element name="api-level" type="xsd:positiveInteger" /> 66*4bfccde5SXin Li <!-- Note: Add-ons do not support 'codename' (a.k.a. API previews). --> 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 <!-- The optional license of this package. If present, users will have 72*4bfccde5SXin Li to agree to it before downloading. --> 73*4bfccde5SXin Li <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> 74*4bfccde5SXin Li <!-- The optional description of this package. --> 75*4bfccde5SXin Li <xsd:element name="description" type="xsd:string" minOccurs="0" /> 76*4bfccde5SXin Li <!-- The optional description URL of this package --> 77*4bfccde5SXin Li <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> 78*4bfccde5SXin Li <!-- The optional release note for this package. --> 79*4bfccde5SXin Li <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> 80*4bfccde5SXin Li <!-- The optional release note URL of this package --> 81*4bfccde5SXin Li <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> 82*4bfccde5SXin Li <!-- A list of file archives for this package. --> 83*4bfccde5SXin Li <xsd:element name="archives" type="sdk:archivesType" /> 84*4bfccde5SXin Li 85*4bfccde5SXin Li <!-- An optional element indicating the package is obsolete. 86*4bfccde5SXin Li The string content is however currently not defined and ignored. --> 87*4bfccde5SXin Li <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> 88*4bfccde5SXin Li 89*4bfccde5SXin Li <!-- An add-on can declare 0 or more libraries. --> 90*4bfccde5SXin Li 91*4bfccde5SXin Li <xsd:element name="libs"> 92*4bfccde5SXin Li <xsd:complexType> 93*4bfccde5SXin Li <xsd:sequence minOccurs="0" maxOccurs="unbounded"> 94*4bfccde5SXin Li <xsd:element name="lib"> 95*4bfccde5SXin Li <xsd:complexType> 96*4bfccde5SXin Li <xsd:all> 97*4bfccde5SXin Li <!-- The name of the library. --> 98*4bfccde5SXin Li <xsd:element name="name" type="xsd:normalizedString" /> 99*4bfccde5SXin Li <!-- The optional description of this add-on library. --> 100*4bfccde5SXin Li <xsd:element name="description" type="xsd:string" minOccurs="0" /> 101*4bfccde5SXin Li </xsd:all> 102*4bfccde5SXin Li </xsd:complexType> 103*4bfccde5SXin Li </xsd:element> 104*4bfccde5SXin Li </xsd:sequence> 105*4bfccde5SXin Li </xsd:complexType> 106*4bfccde5SXin Li </xsd:element> 107*4bfccde5SXin Li </xsd:all> 108*4bfccde5SXin Li </xsd:complexType> 109*4bfccde5SXin Li 110*4bfccde5SXin Li 111*4bfccde5SXin Li <!-- The definition of an SDK extra package. This kind of package is for 112*4bfccde5SXin Li "free" content. Such packages are installed in SDK/vendor/path. 113*4bfccde5SXin Li --> 114*4bfccde5SXin Li 115*4bfccde5SXin Li <xsd:complexType name="extraType" > 116*4bfccde5SXin Li <xsd:annotation> 117*4bfccde5SXin Li <xsd:documentation> 118*4bfccde5SXin Li An SDK extra package. This kind of package is for "free" content. 119*4bfccde5SXin Li Such packages are installed in SDK/vendor/path. 120*4bfccde5SXin Li </xsd:documentation> 121*4bfccde5SXin Li </xsd:annotation> 122*4bfccde5SXin Li <xsd:all> 123*4bfccde5SXin Li 124*4bfccde5SXin Li <!-- The install path top folder name. It must not be empty. 125*4bfccde5SXin Li The segments "add-ons", "docs", "platforms", "platform-tools", "temp" 126*4bfccde5SXin Li and "tools" are reserved and cannot be used. 127*4bfccde5SXin Li --> 128*4bfccde5SXin Li <xsd:element name="vendor" type="sdk:segmentType" /> 129*4bfccde5SXin Li 130*4bfccde5SXin Li <!-- The install path sub-folder name. It must not be empty. --> 131*4bfccde5SXin Li <xsd:element name="path" type="sdk:segmentType" /> 132*4bfccde5SXin Li 133*4bfccde5SXin Li <!-- The revision, an int > 0, incremented each time a new 134*4bfccde5SXin Li package is generated. --> 135*4bfccde5SXin Li <xsd:element name="revision" type="xsd:positiveInteger" /> 136*4bfccde5SXin Li <!-- The optional license of this package. If present, users will have 137*4bfccde5SXin Li to agree to it before downloading. --> 138*4bfccde5SXin Li <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> 139*4bfccde5SXin Li <!-- The optional description of this package. --> 140*4bfccde5SXin Li <xsd:element name="description" type="xsd:string" minOccurs="0" /> 141*4bfccde5SXin Li <!-- The optional description URL of this package --> 142*4bfccde5SXin Li <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> 143*4bfccde5SXin Li <!-- The optional release note for this package. --> 144*4bfccde5SXin Li <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> 145*4bfccde5SXin Li <!-- The optional release note URL of this package --> 146*4bfccde5SXin Li <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> 147*4bfccde5SXin Li <!-- A list of file archives for this package. --> 148*4bfccde5SXin Li <xsd:element name="archives" type="sdk:archivesType" /> 149*4bfccde5SXin Li <!-- The minimal revision of tools required by this package. 150*4bfccde5SXin Li Optional. If present, must be an int > 0. --> 151*4bfccde5SXin Li <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> 152*4bfccde5SXin Li <!-- The minimal API level required by this package. 153*4bfccde5SXin Li Optional. If present, must be an int > 0. --> 154*4bfccde5SXin Li <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> 155*4bfccde5SXin Li 156*4bfccde5SXin Li <!-- An optional element indicating the package is obsolete. 157*4bfccde5SXin Li The string content is however currently not defined and ignored. --> 158*4bfccde5SXin Li <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> 159*4bfccde5SXin Li </xsd:all> 160*4bfccde5SXin Li </xsd:complexType> 161*4bfccde5SXin Li 162*4bfccde5SXin Li 163*4bfccde5SXin Li <!-- The definition of a path segment used by the extra element. --> 164*4bfccde5SXin Li 165*4bfccde5SXin Li <xsd:simpleType name="segmentType"> 166*4bfccde5SXin Li <xsd:annotation> 167*4bfccde5SXin Li <xsd:documentation> 168*4bfccde5SXin Li One path segment for the install path of an extra element. 169*4bfccde5SXin Li It must be a single-segment path. It must not be empty. 170*4bfccde5SXin Li </xsd:documentation> 171*4bfccde5SXin Li </xsd:annotation> 172*4bfccde5SXin Li <xsd:restriction base="xsd:token"> 173*4bfccde5SXin Li <xsd:pattern value="[a-zA-Z0-9_]+"/> 174*4bfccde5SXin Li </xsd:restriction> 175*4bfccde5SXin Li </xsd:simpleType> 176*4bfccde5SXin Li 177*4bfccde5SXin Li 178*4bfccde5SXin Li <!-- The definition of a license to be referenced by the uses-license element. --> 179*4bfccde5SXin Li 180*4bfccde5SXin Li <xsd:complexType name="licenseType"> 181*4bfccde5SXin Li <xsd:annotation> 182*4bfccde5SXin Li <xsd:documentation> 183*4bfccde5SXin Li A license definition. Such a license must be used later as a reference 184*4bfccde5SXin Li using a uses-license element in one of the package elements. 185*4bfccde5SXin Li </xsd:documentation> 186*4bfccde5SXin Li </xsd:annotation> 187*4bfccde5SXin Li <xsd:simpleContent> 188*4bfccde5SXin Li <xsd:extension base="xsd:string"> 189*4bfccde5SXin Li <xsd:attribute name="id" type="xsd:ID" /> 190*4bfccde5SXin Li <xsd:attribute name="type" type="xsd:token" fixed="text" /> 191*4bfccde5SXin Li </xsd:extension> 192*4bfccde5SXin Li </xsd:simpleContent> 193*4bfccde5SXin Li </xsd:complexType> 194*4bfccde5SXin Li 195*4bfccde5SXin Li 196*4bfccde5SXin Li <!-- Type describing the license used by a package. 197*4bfccde5SXin Li The license MUST be defined using a license node and referenced 198*4bfccde5SXin Li using the ref attribute of the license element inside a package. 199*4bfccde5SXin Li --> 200*4bfccde5SXin Li 201*4bfccde5SXin Li <xsd:complexType name="usesLicenseType"> 202*4bfccde5SXin Li <xsd:annotation> 203*4bfccde5SXin Li <xsd:documentation> 204*4bfccde5SXin Li Describes the license used by a package. The license MUST be defined 205*4bfccde5SXin Li using a license node and referenced using the ref attribute of the 206*4bfccde5SXin Li license element inside a package. 207*4bfccde5SXin Li </xsd:documentation> 208*4bfccde5SXin Li </xsd:annotation> 209*4bfccde5SXin Li <xsd:attribute name="ref" type="xsd:IDREF" /> 210*4bfccde5SXin Li </xsd:complexType> 211*4bfccde5SXin Li 212*4bfccde5SXin Li 213*4bfccde5SXin Li <!-- A collection of files that can be downloaded for a given architecture. 214*4bfccde5SXin Li The <archives> node is mandatory in the repository elements and the 215*4bfccde5SXin Li collection must have at least one <archive> declared. 216*4bfccde5SXin Li Each archive is a zip file that will be unzipped in a location that depends 217*4bfccde5SXin Li on its package type. 218*4bfccde5SXin Li --> 219*4bfccde5SXin Li 220*4bfccde5SXin Li <xsd:complexType name="archivesType"> 221*4bfccde5SXin Li <xsd:annotation> 222*4bfccde5SXin Li <xsd:documentation> 223*4bfccde5SXin Li A collection of files that can be downloaded for a given architecture. 224*4bfccde5SXin Li The <archives> node is mandatory in the repository packages and the 225*4bfccde5SXin Li collection must have at least one <archive> declared. 226*4bfccde5SXin Li Each archive is a zip file that will be unzipped in a location that depends 227*4bfccde5SXin Li on its package type. 228*4bfccde5SXin Li </xsd:documentation> 229*4bfccde5SXin Li </xsd:annotation> 230*4bfccde5SXin Li <xsd:sequence minOccurs="1" maxOccurs="unbounded"> 231*4bfccde5SXin Li <!-- One archive file --> 232*4bfccde5SXin Li <xsd:element name="archive"> 233*4bfccde5SXin Li <xsd:complexType> 234*4bfccde5SXin Li <!-- Properties of the archive file --> 235*4bfccde5SXin Li <xsd:all> 236*4bfccde5SXin Li <!-- The size in bytes of the archive to download. --> 237*4bfccde5SXin Li <xsd:element name="size" type="xsd:positiveInteger" /> 238*4bfccde5SXin Li <!-- The checksum of the archive file. --> 239*4bfccde5SXin Li <xsd:element name="checksum" type="sdk:checksumType" /> 240*4bfccde5SXin Li <!-- The URL is an absolute URL if it starts with http://, https:// 241*4bfccde5SXin Li or ftp://. Otherwise it is relative to the parent directory that 242*4bfccde5SXin Li contains this repository.xml --> 243*4bfccde5SXin Li <xsd:element name="url" type="xsd:token" /> 244*4bfccde5SXin Li </xsd:all> 245*4bfccde5SXin Li 246*4bfccde5SXin Li <!-- Attributes that identify the OS and architecture --> 247*4bfccde5SXin Li <xsd:attribute name="os" use="required"> 248*4bfccde5SXin Li <xsd:simpleType> 249*4bfccde5SXin Li <xsd:restriction base="xsd:token"> 250*4bfccde5SXin Li <xsd:enumeration value="any" /> 251*4bfccde5SXin Li <xsd:enumeration value="linux" /> 252*4bfccde5SXin Li <xsd:enumeration value="macosx" /> 253*4bfccde5SXin Li <xsd:enumeration value="windows" /> 254*4bfccde5SXin Li </xsd:restriction> 255*4bfccde5SXin Li </xsd:simpleType> 256*4bfccde5SXin Li </xsd:attribute> 257*4bfccde5SXin Li <xsd:attribute name="arch" use="optional"> 258*4bfccde5SXin Li <xsd:simpleType> 259*4bfccde5SXin Li <xsd:restriction base="xsd:token"> 260*4bfccde5SXin Li <xsd:enumeration value="any" /> 261*4bfccde5SXin Li <xsd:enumeration value="ppc" /> 262*4bfccde5SXin Li <xsd:enumeration value="x86" /> 263*4bfccde5SXin Li <xsd:enumeration value="x86_64" /> 264*4bfccde5SXin Li </xsd:restriction> 265*4bfccde5SXin Li </xsd:simpleType> 266*4bfccde5SXin Li </xsd:attribute> 267*4bfccde5SXin Li </xsd:complexType> 268*4bfccde5SXin Li </xsd:element> 269*4bfccde5SXin Li </xsd:sequence> 270*4bfccde5SXin Li </xsd:complexType> 271*4bfccde5SXin Li 272*4bfccde5SXin Li 273*4bfccde5SXin Li <!-- The definition of a file checksum --> 274*4bfccde5SXin Li 275*4bfccde5SXin Li <xsd:simpleType name="sha1Number"> 276*4bfccde5SXin Li <xsd:annotation> 277*4bfccde5SXin Li <xsd:documentation>A SHA1 checksum.</xsd:documentation> 278*4bfccde5SXin Li </xsd:annotation> 279*4bfccde5SXin Li <xsd:restriction base="xsd:string"> 280*4bfccde5SXin Li <xsd:pattern value="([0-9a-fA-F]){40}"/> 281*4bfccde5SXin Li </xsd:restriction> 282*4bfccde5SXin Li </xsd:simpleType> 283*4bfccde5SXin Li 284*4bfccde5SXin Li <xsd:complexType name="checksumType"> 285*4bfccde5SXin Li <xsd:annotation> 286*4bfccde5SXin Li <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> 287*4bfccde5SXin Li </xsd:annotation> 288*4bfccde5SXin Li <xsd:simpleContent> 289*4bfccde5SXin Li <xsd:extension base="sdk:sha1Number"> 290*4bfccde5SXin Li <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> 291*4bfccde5SXin Li </xsd:extension> 292*4bfccde5SXin Li </xsd:simpleContent> 293*4bfccde5SXin Li </xsd:complexType> 294*4bfccde5SXin Li 295*4bfccde5SXin Li</xsd:schema> 296