Home | History | Annotate | Download | only in repository
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  * Copyright (C) 2012 The Android Open Source Project
      4  *
      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
      8  *
      9  *      http://www.apache.org/licenses/LICENSE-2.0
     10  *
     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.
     16 -->
     17 <xsd:schema
     18     targetNamespace="http://schemas.android.com/sdk/android/repository/8"
     19     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     20     xmlns:sdk="http://schemas.android.com/sdk/android/repository/8"
     21     elementFormDefault="qualified"
     22     attributeFormDefault="unqualified"
     23     version="1">
     24 
     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.
     28 
     29          An Android SDK repository is a web site that contains a "repository.xml"
     30          file that conforms to this XML Schema.
     31 
     32          History:
     33          - v1 is used by the SDK Updater in Tools r3 and r4.
     34 
     35          - v2 is used by the SDK Updater in Tools r5:
     36             - It introduces a new <sample> repository type. Previously samples
     37               were included in the <platform> packages. Instead this package is used
     38               and and the samples are installed in $SDK/samples.
     39             - All repository types have a new <obsolete> node. It works as a marker
     40               to indicate the package is obsolete and should not be selected by default.
     41               The UI also hides these out by default.
     42 
     43          - v3 is used by the SDK Updater in Tools r8:
     44             - It introduces a new <platform-tool> repository type. Previously platform-specific
     45               tools were included in the <platform> packages. Instead this package is used
     46               and platform-specific tools are installed in $SDK/platform-tools
     47             - There's a new element <min-platform-tools-rev> in <tool>. The tool package now
     48               requires that at least some minimal version of <platform-tool> be installed.
     49             - It removes the <addon> repository type, which is now in its own XML Schema.
     50 
     51          - v4 is used by the SDK Updater in Tools r12:
     52             - <extra> element now has a <project-files> element that contains 1 or
     53               or more <path>, each indicating the relative path of a file that this package
     54               can contribute to installed projects.
     55             - <platform> element now has a mandatory <layoutlib> that indicates the API
     56               and revision of that layout library for this particular platform.
     57 
     58          - v5 is used by the SDK Manager in Tools r14:
     59             - <extra> now has an <old-paths> element, a ;-separated list of old paths that
     60               should be detected and migrated to the new <path> for that package.
     61             - <platform> has a new optional <abi-included> that describes the ABI of the
     62               system image included in the platform, if any.
     63             - New <system-image> package type, to store system images outside of <platform>s.
     64             - New <source> package type.
     65 
     66          - v6 is used by the SDK Manager in Tools r18:
     67             - <extra> packages are removed. They are served only by the addon XML.
     68             - <platform>, <system-image>, <source>, <tool>, <platform-tool>, <doc>
     69               and <sample> get a new optional field <beta-rc> which can be used to indicate
     70               the package is a Beta Release Candidate and not a final release.
     71 
     72          - v7 is used by the SDK Manager in Tools r20:
     73             - For <tool> and <platform-tool> packages, the <revision> element becomes a
     74               a "full revision" element with <major>, <minor>, <micro> and <preview> sub-elements.
     75             - The <beta-rc> element is no longer supported, it is replaced by
     76               <revision> -> <preview> and is only for <tool> and <platform-tool> packages.
     77             - <min-tools-rev> and <min-platform-tools-rev> also become a full revision element.
     78 
     79          - v8 is used by the SDK Manager in Tools r22:
     80             - It introduces the new <build-tool> repository type, which contains build-specific
     81               tools that were before placed in either <tool> or <platform-tool> (e.g. ant,
     82               aapt, aidl, etc.)
     83             - <tool> has a new "min-build-tool" attribute.
     84     -->
     85 
     86     <xsd:element name="sdk-repository" type="sdk:repositoryType" />
     87 
     88     <xsd:complexType name="repositoryType">
     89         <xsd:annotation>
     90             <xsd:documentation>
     91                 The repository contains a collection of downloadable packages.
     92             </xsd:documentation>
     93         </xsd:annotation>
     94         <xsd:choice minOccurs="0" maxOccurs="unbounded">
     95             <xsd:element name="platform"        type="sdk:platformType"     />
     96             <xsd:element name="system-image"    type="sdk:systemImageType"  />
     97             <xsd:element name="source"          type="sdk:sourceType"       />
     98             <xsd:element name="tool"            type="sdk:toolType"         />
     99             <xsd:element name="platform-tool"   type="sdk:platformToolType" />
    100             <xsd:element name="build-tool"      type="sdk:buildToolType"    />
    101             <xsd:element name="doc"             type="sdk:docType"          />
    102             <xsd:element name="sample"          type="sdk:sampleType"       />
    103             <xsd:element name="license"         type="sdk:licenseType"      />
    104         </xsd:choice>
    105     </xsd:complexType>
    106 
    107     <!-- The definition of an SDK platform package. -->
    108 
    109     <xsd:complexType name="platformType">
    110         <xsd:annotation>
    111             <xsd:documentation>An SDK platform package.</xsd:documentation>
    112         </xsd:annotation>
    113         <xsd:all>
    114             <!-- The Android platform version. It is string such as "1.0". -->
    115             <xsd:element name="version"   type="xsd:normalizedString" />
    116             <!-- The Android API Level for the platform. An int > 0. -->
    117             <xsd:element name="api-level" type="xsd:positiveInteger"  />
    118             <!-- The optional codename for this platform, if it's a preview. -->
    119             <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
    120             <!-- The revision, an int > 0, incremented each time a new
    121                  package is generated. -->
    122             <xsd:element name="revision"  type="xsd:positiveInteger" />
    123 
    124             <!-- Information on the layoutlib packaged in this platform. -->
    125             <xsd:element name="layoutlib" type="sdk:layoutlibType" />
    126 
    127             <!-- optional elements -->
    128 
    129             <!-- The optional license of this package. If present, users will have
    130                  to agree to it before downloading. -->
    131             <xsd:element name="uses-license"  type="sdk:usesLicenseType" minOccurs="0" />
    132             <!-- The optional description of this package. -->
    133             <xsd:element name="description"   type="xsd:string"      minOccurs="0" />
    134             <!-- The optional description URL of this package -->
    135             <xsd:element name="desc-url"      type="xsd:token"       minOccurs="0" />
    136             <!-- The optional release note for this package. -->
    137             <xsd:element name="release-note"  type="xsd:string"      minOccurs="0" />
    138             <!-- The optional release note URL of this package -->
    139             <xsd:element name="release-url"   type="xsd:token"       minOccurs="0" />
    140             <!-- A list of file archives for this package. -->
    141             <xsd:element name="archives"      type="sdk:archivesType" />
    142             <!-- The minimal revision of tools required by this package.
    143                  Optional. If present, must be a revision element. -->
    144             <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" />
    145 
    146             <!-- The ABI of the system image *included* in this platform, if any.
    147                  When the field is present, it means the platform already embeds one
    148                  system image. A platform can also have any number of external
    149                  &lt;system-image&gt; associated with it.  -->
    150             <xsd:element name="included-abi"  type="sdk:abiType" minOccurs="0" />
    151 
    152             <!-- An optional element indicating the package is obsolete.
    153                  The string content is however currently not defined and ignored. -->
    154             <xsd:element name="obsolete"      type="xsd:string" minOccurs="0" />
    155         </xsd:all>
    156     </xsd:complexType>
    157 
    158 
    159     <!-- The definition of a layout library used by a platform. -->
    160 
    161     <xsd:complexType name="layoutlibType" >
    162         <xsd:annotation>
    163             <xsd:documentation>
    164                 Version information for a layoutlib included in a platform.
    165             </xsd:documentation>
    166         </xsd:annotation>
    167         <xsd:all>
    168             <!-- The layoutlib API level, an int > 0,
    169                  incremented with each new incompatible lib. -->
    170             <xsd:element name="api"          type="xsd:positiveInteger" />
    171             <!-- The incremental minor revision for that API, e.g. in case of bug fixes.
    172                  Optional. An int >= 0, assumed to be 0 if the element is missing. -->
    173             <xsd:element name="revision"     type="xsd:nonNegativeInteger" minOccurs="0" />
    174         </xsd:all>
    175     </xsd:complexType>
    176 
    177 
    178     <!-- The definition of a system image used by a platform. -->
    179 
    180     <xsd:complexType name="systemImageType" >
    181         <xsd:annotation>
    182             <xsd:documentation>
    183                 System Image for a platform.
    184             </xsd:documentation>
    185         </xsd:annotation>
    186         <xsd:all>
    187             <!-- api-level + codename identifies the platform to which this system image belongs. -->
    188 
    189             <!-- The Android API Level for the platform. An int > 0. -->
    190             <xsd:element name="api-level" type="xsd:positiveInteger"  />
    191             <!-- The optional codename for this platform, if it's a preview. -->
    192             <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
    193 
    194             <!-- The revision, an int > 0, incremented each time a new
    195                  package is generated. -->
    196             <xsd:element name="revision"  type="xsd:positiveInteger" />
    197 
    198             <!-- The ABI of the system emulated by this image. -->
    199             <xsd:element name="abi"       type="sdk:abiType" />
    200 
    201             <!-- The optional license of this package. If present, users will have
    202                  to agree to it before downloading. -->
    203             <xsd:element name="uses-license"  type="sdk:usesLicenseType" minOccurs="0" />
    204             <!-- The optional description of this package. -->
    205             <xsd:element name="description"   type="xsd:string"      minOccurs="0" />
    206             <!-- The optional description URL of this package -->
    207             <xsd:element name="desc-url"      type="xsd:token"       minOccurs="0" />
    208             <!-- The optional release note for this package. -->
    209             <xsd:element name="release-note"  type="xsd:string"      minOccurs="0" />
    210             <!-- The optional release note URL of this package -->
    211             <xsd:element name="release-url"   type="xsd:token"       minOccurs="0" />
    212 
    213             <!-- A list of file archives for this package. -->
    214             <xsd:element name="archives"  type="sdk:archivesType" />
    215 
    216             <!-- An optional element indicating the package is obsolete.
    217                  The string content is however currently not defined and ignored. -->
    218             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    219         </xsd:all>
    220     </xsd:complexType>
    221 
    222 
    223     <!-- The definition of the ABI supported by a platform's system image. -->
    224 
    225     <xsd:simpleType name="abiType">
    226         <xsd:annotation>
    227             <xsd:documentation>The ABI of a platform's system image.</xsd:documentation>
    228         </xsd:annotation>
    229         <xsd:restriction base="xsd:token">
    230             <xsd:enumeration value="armeabi"     />
    231             <xsd:enumeration value="armeabi-v7a" />
    232             <xsd:enumeration value="x86"         />
    233             <xsd:enumeration value="mips"        />
    234         </xsd:restriction>
    235     </xsd:simpleType>
    236 
    237 
    238     <!-- The definition of a source package. -->
    239 
    240     <xsd:complexType name="sourceType" >
    241         <xsd:annotation>
    242             <xsd:documentation>
    243                 Sources for a platform.
    244             </xsd:documentation>
    245         </xsd:annotation>
    246         <xsd:all>
    247             <!-- api-level + codename identifies the platform to which this source belongs. -->
    248 
    249             <!-- The Android API Level for the platform. An int > 0. -->
    250             <xsd:element name="api-level" type="xsd:positiveInteger"  />
    251             <!-- The optional codename for this platform, if it's a preview. -->
    252             <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
    253 
    254             <!-- The revision, an int > 0, incremented each time a new
    255                  package is generated. -->
    256             <xsd:element name="revision"  type="xsd:positiveInteger" />
    257 
    258             <!-- The optional license of this package. If present, users will have
    259                  to agree to it before downloading. -->
    260             <xsd:element name="uses-license"  type="sdk:usesLicenseType" minOccurs="0" />
    261             <!-- The optional description of this package. -->
    262             <xsd:element name="description"   type="xsd:string"      minOccurs="0" />
    263             <!-- The optional description URL of this package -->
    264             <xsd:element name="desc-url"      type="xsd:token"       minOccurs="0" />
    265             <!-- The optional release note for this package. -->
    266             <xsd:element name="release-note"  type="xsd:string"      minOccurs="0" />
    267             <!-- The optional release note URL of this package -->
    268             <xsd:element name="release-url"   type="xsd:token"       minOccurs="0" />
    269 
    270             <!-- A list of file archives for this package. -->
    271             <xsd:element name="archives"  type="sdk:archivesType" />
    272 
    273             <!-- An optional element indicating the package is obsolete.
    274                  The string content is however currently not defined and ignored. -->
    275             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    276         </xsd:all>
    277     </xsd:complexType>
    278 
    279 
    280     <!-- The definition of an SDK tool package. -->
    281 
    282     <xsd:complexType name="toolType" >
    283         <xsd:annotation>
    284             <xsd:documentation>An SDK tool package.</xsd:documentation>
    285         </xsd:annotation>
    286         <xsd:all>
    287             <!-- The full revision (major.minor.micro.preview), incremented each
    288                  time a new package is generated. -->
    289             <xsd:element name="revision"      type="sdk:revisionType" />
    290 
    291             <!-- The optional license of this package. If present, users will have
    292                  to agree to it before downloading. -->
    293             <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" />
    294             <!-- The optional description of this package. -->
    295             <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
    296             <!-- The optional description URL of this package -->
    297             <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
    298             <!-- The optional release note for this package. -->
    299             <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
    300             <!-- The optional release note URL of this package -->
    301             <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
    302             <!-- A list of file archives for this package. -->
    303             <xsd:element name="archives"     type="sdk:archivesType" />
    304 
    305             <!-- The minimal revision of platform-tools required by this package.
    306                  Mandatory. Must be a revision element. -->
    307             <xsd:element name="min-platform-tools-rev" type="sdk:revisionType" />
    308 
    309             <!-- An optional element indicating the package is obsolete.
    310                  The string content is however currently not defined and ignored. -->
    311             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    312         </xsd:all>
    313     </xsd:complexType>
    314 
    315 
    316     <!-- The definition of an SDK platform-tool package. -->
    317 
    318     <xsd:complexType name="platformToolType" >
    319         <xsd:annotation>
    320             <xsd:documentation>An SDK platform-tool package.</xsd:documentation>
    321         </xsd:annotation>
    322         <xsd:all>
    323             <!-- The full revision (major.minor.micro.preview), incremented each
    324                  time a new package is generated. -->
    325             <xsd:element name="revision"      type="sdk:revisionType" />
    326 
    327             <!-- The optional license of this package. If present, users will have
    328                  to agree to it before downloading. -->
    329             <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" />
    330             <!-- The optional description of this package. -->
    331             <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
    332             <!-- The optional description URL of this package -->
    333             <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
    334             <!-- The optional release note for this package. -->
    335             <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
    336             <!-- The optional release note URL of this package -->
    337             <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
    338             <!-- A list of file archives for this package. -->
    339             <xsd:element name="archives"     type="sdk:archivesType" />
    340 
    341             <!-- An optional element indicating the package is obsolete.
    342                  The string content is however currently not defined and ignored. -->
    343             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    344         </xsd:all>
    345     </xsd:complexType>
    346 
    347     <!-- The definition of an SDK build-tool package. -->
    348 
    349     <xsd:complexType name="buildToolType">
    350         <xsd:annotation>
    351             <xsd:documentation>An SDK build-tool package.</xsd:documentation>
    352         </xsd:annotation>
    353         <xsd:all>
    354             <!-- The full revision (major.minor.micro.preview), incremented each
    355                  time a new package is generated. -->
    356             <xsd:element name="revision"      type="sdk:revisionType" />
    357 
    358             <!-- optional elements -->
    359 
    360             <!-- The optional license of this package. If present, users will have
    361                  to agree to it before downloading. -->
    362             <xsd:element name="uses-license"  type="sdk:usesLicenseType" minOccurs="0" />
    363             <!-- The optional description of this package. -->
    364             <xsd:element name="description"   type="xsd:string"      minOccurs="0" />
    365             <!-- The optional description URL of this package -->
    366             <xsd:element name="desc-url"      type="xsd:token"       minOccurs="0" />
    367             <!-- The optional release note for this package. -->
    368             <xsd:element name="release-note"  type="xsd:string"      minOccurs="0" />
    369             <!-- The optional release note URL of this package -->
    370             <xsd:element name="release-url"   type="xsd:token"       minOccurs="0" />
    371             <!-- A list of file archives for this package. -->
    372             <xsd:element name="archives"      type="sdk:archivesType" />
    373 
    374             <!-- An optional element indicating the package is obsolete.
    375                  The string content is however currently not defined and ignored. -->
    376             <xsd:element name="obsolete"      type="xsd:string" minOccurs="0" />
    377         </xsd:all>
    378     </xsd:complexType>
    379 
    380 
    381     <!-- The definition of an SDK doc package. -->
    382 
    383     <xsd:complexType name="docType" >
    384         <xsd:annotation>
    385             <xsd:documentation>An SDK doc package.</xsd:documentation>
    386         </xsd:annotation>
    387         <xsd:all>
    388             <!-- The Android API Level for the documentation. An int > 0. -->
    389             <xsd:element name="api-level" type="xsd:positiveInteger"  />
    390             <!-- The optional codename for this doc, if it's a preview. -->
    391             <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
    392 
    393             <!-- The revision, an int > 0, incremented each time a new
    394                  package is generated. -->
    395             <xsd:element name="revision"     type="xsd:positiveInteger" />
    396             <!-- The optional license of this package. If present, users will have
    397                  to agree to it before downloading. -->
    398             <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" />
    399             <!-- The optional description of this package. -->
    400             <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
    401             <!-- The optional description URL of this package -->
    402             <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
    403             <!-- The optional release note for this package. -->
    404             <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
    405             <!-- The optional release note URL of this package -->
    406             <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
    407             <!-- A list of file archives for this package. -->
    408             <xsd:element name="archives"     type="sdk:archivesType" />
    409 
    410 
    411             <!-- An optional element indicating the package is obsolete.
    412                  The string content is however currently not defined and ignored. -->
    413             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    414         </xsd:all>
    415     </xsd:complexType>
    416 
    417 
    418     <!-- The definition of an SDK sample package. -->
    419 
    420     <xsd:complexType name="sampleType" >
    421         <xsd:annotation>
    422             <xsd:documentation>An SDK sample package.</xsd:documentation>
    423         </xsd:annotation>
    424         <xsd:all>
    425             <!-- The Android API Level for the documentation. An int > 0. -->
    426             <xsd:element name="api-level" type="xsd:positiveInteger"  />
    427             <!-- The optional codename for this doc, if it's a preview. -->
    428             <xsd:element name="codename"  type="xsd:string" minOccurs="0" />
    429 
    430             <!-- The revision, an int > 0, incremented each time a new
    431                  package is generated. -->
    432             <xsd:element name="revision"     type="xsd:positiveInteger" />
    433             <!-- The optional license of this package. If present, users will have
    434                  to agree to it before downloading. -->
    435             <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" />
    436             <!-- The optional description of this package. -->
    437             <xsd:element name="description"  type="xsd:string"      minOccurs="0" />
    438             <!-- The optional description URL of this package -->
    439             <xsd:element name="desc-url"     type="xsd:token"       minOccurs="0" />
    440             <!-- The optional release note for this package. -->
    441             <xsd:element name="release-note" type="xsd:string"      minOccurs="0" />
    442             <!-- The optional release note URL of this package -->
    443             <xsd:element name="release-url"  type="xsd:token"       minOccurs="0" />
    444             <!-- A list of file archives for this package. -->
    445             <xsd:element name="archives"     type="sdk:archivesType" />
    446             <!-- The minimal revision of tools required by this package.
    447                  Optional. If present, must be a revision element. -->
    448             <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" />
    449 
    450 
    451             <!-- An optional element indicating the package is obsolete.
    452                  The string content is however currently not defined and ignored. -->
    453             <xsd:element name="obsolete"  type="xsd:string" minOccurs="0" />
    454         </xsd:all>
    455     </xsd:complexType>
    456 
    457 
    458     <!-- The definition of a path segment used by the extra element. -->
    459 
    460     <xsd:simpleType name="segmentType">
    461         <xsd:annotation>
    462             <xsd:documentation>
    463                 One path segment for the install path of an extra element.
    464                 It must be a single-segment path.
    465             </xsd:documentation>
    466         </xsd:annotation>
    467         <xsd:restriction base="xsd:token">
    468             <xsd:pattern value="[a-zA-Z0-9_]+"/>
    469         </xsd:restriction>
    470     </xsd:simpleType>
    471 
    472     <xsd:simpleType name="segmentListType">
    473         <xsd:annotation>
    474             <xsd:documentation>
    475                 A semi-colon separated list of a segmentTypes.
    476             </xsd:documentation>
    477         </xsd:annotation>
    478         <xsd:restriction base="xsd:token">
    479             <xsd:pattern value="[a-zA-Z0-9_;]+"/>
    480         </xsd:restriction>
    481     </xsd:simpleType>
    482 
    483 
    484     <!-- The definition of a license to be referenced by the uses-license element. -->
    485 
    486     <xsd:complexType name="licenseType">
    487         <xsd:annotation>
    488             <xsd:documentation>
    489                 A license definition. Such a license must be used later as a reference
    490                 using a uses-license element in one of the package elements.
    491             </xsd:documentation>
    492         </xsd:annotation>
    493         <xsd:simpleContent>
    494             <xsd:extension base="xsd:string">
    495                 <xsd:attribute name="id"   type="xsd:ID" />
    496                 <xsd:attribute name="type" type="xsd:token" fixed="text" />
    497             </xsd:extension>
    498         </xsd:simpleContent>
    499     </xsd:complexType>
    500 
    501 
    502     <!-- Type describing the license used by a package.
    503          The license MUST be defined using a license node and referenced
    504          using the ref attribute of the license element inside a package.
    505      -->
    506 
    507     <xsd:complexType name="usesLicenseType">
    508         <xsd:annotation>
    509             <xsd:documentation>
    510                 Describes the license used by a package. The license MUST be defined
    511                 using a license node and referenced using the ref attribute of the
    512                 license element inside a package.
    513             </xsd:documentation>
    514         </xsd:annotation>
    515         <xsd:attribute name="ref" type="xsd:IDREF" />
    516     </xsd:complexType>
    517 
    518 
    519     <!-- A collection of files that can be downloaded for a given architecture.
    520          The <archives> node is mandatory in the repository elements and the
    521          collection must have at least one <archive> declared.
    522          Each archive is a zip file that will be unzipped in a location that depends
    523          on its package type.
    524      -->
    525 
    526     <xsd:complexType name="archivesType">
    527         <xsd:annotation>
    528             <xsd:documentation>
    529                 A collection of files that can be downloaded for a given architecture.
    530                 The &lt;archives&gt; node is mandatory in the repository packages and the
    531                 collection must have at least one &lt;archive&gt; declared.
    532                 Each archive is a zip file that will be unzipped in a location that depends
    533                 on its package type.
    534             </xsd:documentation>
    535         </xsd:annotation>
    536         <xsd:sequence minOccurs="1" maxOccurs="unbounded">
    537             <!-- One archive file -->
    538             <xsd:element name="archive">
    539                 <xsd:complexType>
    540                     <!-- Properties of the archive file -->
    541                     <xsd:all>
    542                         <!-- The size in bytes of the archive to download. -->
    543                         <xsd:element name="size"     type="xsd:positiveInteger" />
    544                         <!-- The checksum of the archive file. -->
    545                         <xsd:element name="checksum" type="sdk:checksumType" />
    546                         <!-- The URL is an absolute URL if it starts with http://, https://
    547                              or ftp://. Otherwise it is relative to the parent directory that
    548                              contains this repository.xml -->
    549                         <xsd:element name="url"      type="xsd:token" />
    550                     </xsd:all>
    551 
    552                     <!-- Attributes that identify the OS and architecture -->
    553                     <xsd:attribute name="os" use="required">
    554                         <xsd:simpleType>
    555                             <xsd:restriction base="xsd:token">
    556                                 <xsd:enumeration value="any" />
    557                                 <xsd:enumeration value="linux" />
    558                                 <xsd:enumeration value="macosx" />
    559                                 <xsd:enumeration value="windows" />
    560                             </xsd:restriction>
    561                         </xsd:simpleType>
    562                     </xsd:attribute>
    563                     <xsd:attribute name="arch" use="optional">
    564                         <xsd:simpleType>
    565                             <xsd:restriction base="xsd:token">
    566                                 <xsd:enumeration value="any" />
    567                                 <xsd:enumeration value="ppc" />
    568                                 <xsd:enumeration value="x86" />
    569                                 <xsd:enumeration value="x86_64" />
    570                             </xsd:restriction>
    571                         </xsd:simpleType>
    572                     </xsd:attribute>
    573                 </xsd:complexType>
    574             </xsd:element>
    575         </xsd:sequence>
    576     </xsd:complexType>
    577 
    578 
    579     <!-- A full revision, with a major.minor.micro and an optional preview number.
    580          The major number is mandatory, the other elements are optional.
    581      -->
    582 
    583     <xsd:complexType name="revisionType">
    584         <xsd:annotation>
    585             <xsd:documentation>
    586                 A full revision, with a major.minor.micro and an
    587                 optional preview number. The major number is mandatory.
    588             </xsd:documentation>
    589         </xsd:annotation>
    590         <xsd:all>
    591             <!-- The major revision, an int > 0, incremented each time a new
    592                  package is generated. -->
    593             <xsd:element name="major"      type="xsd:positiveInteger" />
    594             <!-- The minor revision, an int >= 0, incremented each time a new
    595                  minor package is generated. Assumed to be 0 if missing. -->
    596             <xsd:element name="minor"     type="xsd:nonNegativeInteger" minOccurs="0" />
    597             <!-- The micro revision, an int >= 0, incremented each time a new
    598                  buf fix is generated. Assumed to be 0 if missing. -->
    599             <xsd:element name="micro"     type="xsd:nonNegativeInteger" minOccurs="0" />
    600             <!-- The preview/release candidate revision, an int > 0,
    601                  incremented each time a new preview is generated.
    602                  Not present for final releases. -->
    603             <xsd:element name="preview"   type="xsd:positiveInteger" minOccurs="0" />
    604         </xsd:all>
    605     </xsd:complexType>
    606 
    607 
    608     <!-- A collection of file paths available in an &lt;extra&gt; package
    609          that can be installed in an Android project.
    610          If present, the &lt;project-files&gt; collection must contain at least one path.
    611          Each path is relative to the root directory of the package.
    612      -->
    613 
    614     <xsd:complexType name="projectFilesType">
    615         <xsd:annotation>
    616             <xsd:documentation>
    617                 A collection of file paths available in an &lt;extra&gt; package
    618                 that can be installed in an Android project.
    619                 If present, the &lt;project-files&gt; collection must contain at least one path.
    620                 Each path is relative to the root directory of the package.
    621             </xsd:documentation>
    622         </xsd:annotation>
    623         <xsd:sequence minOccurs="1" maxOccurs="unbounded">
    624             <!-- One JAR Path, relative to the root folder of the package. -->
    625             <xsd:element name="path" type="xsd:string" />
    626         </xsd:sequence>
    627     </xsd:complexType>
    628 
    629 
    630     <!-- The definition of a file checksum -->
    631 
    632     <xsd:simpleType name="sha1Number">
    633         <xsd:annotation>
    634             <xsd:documentation>A SHA1 checksum.</xsd:documentation>
    635         </xsd:annotation>
    636         <xsd:restriction base="xsd:string">
    637             <xsd:pattern value="([0-9a-fA-F]){40}"/>
    638         </xsd:restriction>
    639     </xsd:simpleType>
    640 
    641     <xsd:complexType name="checksumType">
    642         <xsd:annotation>
    643             <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation>
    644         </xsd:annotation>
    645         <xsd:simpleContent>
    646             <xsd:extension base="sdk:sha1Number">
    647                 <xsd:attribute name="type" type="xsd:token" fixed="sha1" />
    648             </xsd:extension>
    649         </xsd:simpleContent>
    650     </xsd:complexType>
    651 
    652 </xsd:schema>
    653