diff options
author | Raphael Moll <ralf@android.com> | 2013-02-04 15:21:35 -0800 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2013-02-07 12:59:05 -0800 |
commit | cba8e11469a9f1c7d1289e272fa099c230207758 (patch) | |
tree | f342624db44bfc43f39715d79e983c8af6681e21 /repository | |
parent | 0942541af07b37b83af9403f65ac7f1e3eed1f78 (diff) | |
download | devtools-cba8e11469a9f1c7d1289e272fa099c230207758.tar.gz |
More SDK prebuilts.
Built from tools/base.git @ 555be9c36fd5ea977273edc9538547f8642af62b
Change-Id: I913a29e5f40db99871701461aad6fc38483015d2
Diffstat (limited to 'repository')
-rwxr-xr-x | repository/sdk-addon-1.xsd | 295 | ||||
-rwxr-xr-x | repository/sdk-addon-2.xsd | 361 | ||||
-rwxr-xr-x | repository/sdk-addon-3.xsd | 381 | ||||
-rwxr-xr-x | repository/sdk-addon-4.xsd | 417 | ||||
-rwxr-xr-x | repository/sdk-addon-5.xsd | 442 | ||||
-rwxr-xr-x | repository/sdk-addons-list-1.xsd | 71 | ||||
-rwxr-xr-x | repository/sdk-addons-list-2.xsd | 106 | ||||
-rwxr-xr-x | repository/sdk-repository-1.xsd | 381 | ||||
-rwxr-xr-x | repository/sdk-repository-2.xsd | 438 | ||||
-rwxr-xr-x | repository/sdk-repository-3.xsd | 436 | ||||
-rwxr-xr-x | repository/sdk-repository-4.xsd | 500 | ||||
-rwxr-xr-x | repository/sdk-repository-5.xsd | 624 | ||||
-rwxr-xr-x | repository/sdk-repository-6.xsd | 608 | ||||
-rwxr-xr-x | repository/sdk-repository-7.xsd | 612 | ||||
-rwxr-xr-x | repository/sdk-stats-1.xsd | 96 | ||||
-rwxr-xr-x | repository/sdk-sys-img-1.xsd | 229 |
16 files changed, 5997 insertions, 0 deletions
diff --git a/repository/sdk-addon-1.xsd b/repository/sdk-addon-1.xsd new file mode 100755 index 0000000..1d53313 --- /dev/null +++ b/repository/sdk-addon-1.xsd @@ -0,0 +1,295 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addon/1" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/addon/1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r8. It is split out of the + main SDK Repository XML Schema and can only contain <addon> and + <extra> packages. + --> + + <xsd:element name="sdk-addon" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="add-on" type="sdk:addonType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The vendor of the add-on. --> + <xsd:element name="vendor" type="xsd:normalizedString" /> + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codename' (a.k.a. API previews). --> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An add-on can declare 0 or more libraries. --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. It must not be empty. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. It must not be empty. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. It must not be empty. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addon-2.xsd b/repository/sdk-addon-2.xsd new file mode 100755 index 0000000..27fae8b --- /dev/null +++ b/repository/sdk-addon-2.xsd @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addon/2" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/addon/2" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r8. It is split out of the + main SDK Repository XML Schema and can only contain <addon> and + <extra> packages. + + - v2 is used by the SDK Updater in Tools r12. + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <addon> element now has an optional <layoutlib> that indicates the API + and revision of the layout library for this particular add-on, if any. + --> + + <xsd:element name="sdk-addon" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="add-on" type="sdk:addonType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The vendor of the add-on. --> + <xsd:element name="vendor" type="xsd:normalizedString" /> + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codenames' (a.k.a. API previews). --> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- An add-on can declare 0 or more libraries. + This element is mandatory but it can be empty. + --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- Optional information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by an addon. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in an addon. + .</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + + Important implementation detail: this element is duplicated in the + sdk-repository-N.xsd schema and must be kept in sync there. This is + simpler than trying to use some kind of of include or to request + that clients use a third XML schema for common parts. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. It must not be empty. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. It must not be empty. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. It must not be empty. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addon-3.xsd b/repository/sdk-addon-3.xsd new file mode 100755 index 0000000..ccd00c2 --- /dev/null +++ b/repository/sdk-addon-3.xsd @@ -0,0 +1,381 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addon/3" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/addon/3" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r8. It is split out of the + main SDK Repository XML Schema and can only contain <addon> and + <extra> packages. + + - v2 is used by the SDK Updater in Tools r12. + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <addon> element now has an optional <layoutlib> that indicates the API + and revision of the layout library for this particular add-on, if any. + + - v3 is used by the SDK Updater in Tools R14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + --> + + <xsd:element name="sdk-addon" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="add-on" type="sdk:addonType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The vendor of the add-on. --> + <xsd:element name="vendor" type="xsd:normalizedString" /> + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codenames' (a.k.a. API previews). --> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- An add-on can declare 0 or more libraries. + This element is mandatory but it can be empty. + --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- Optional information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by an addon. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in an addon. + .</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + + Important implementation detail: this element is duplicated in the + sdk-repository-N.xsd schema and must be kept in sync there. This is + simpler than trying to use some kind of of include or to request + that clients use a third XML schema for common parts. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. It must not be empty. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. It must not be empty. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- A semi-colon separated list of "obsolete" path names which are equivalent + to the current 'path' name. When a package is seen using an old-paths' name, + the package manager will try to upgrade it to the new path. --> + <xsd:element name="old-paths" type="sdk:segmentListType" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. It must not be empty. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addon-4.xsd b/repository/sdk-addon-4.xsd new file mode 100755 index 0000000..c31efbf --- /dev/null +++ b/repository/sdk-addon-4.xsd @@ -0,0 +1,417 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addon/4" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/addon/4" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r8. It is split out of the + main SDK Repository XML Schema and can only contain <addon> and + <extra> packages. + + - v2 is used by the SDK Updater in Tools r12. + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <addon> element now has an optional <layoutlib> that indicates the API + and revision of the layout library for this particular add-on, if any. + + - v3 is used by the SDK Manager in Tools r14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + + - v4 is used by the SDK Manager in Tools r18: + - <extra> and <addon> are not in the Repository XSD v6 anymore. + - <extra> get a new field <name-display>, which is used by the SDK Manager to + customize the name of the extra in the list display. The single <vendor> + field becomes <vendor-id> and <vendor-display>, the id being used internally + and the display in the UI. + - <addon> does the same, where <name> is replaced by <name-id> and <name-display> + and <vendor> is replaced by <vendor-id> and <vendor-display>. + --> + + <xsd:element name="sdk-addon" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="add-on" type="sdk:addonType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The internal name id of the add-on. Must be unique per vendor. --> + <xsd:element name="name-id" type="sdk:idType" /> + <!-- The displayed name of the add-on. --> + <xsd:element name="name-display" type="xsd:normalizedString" /> + + <!-- The internal vendor id of the add-on. Must be unique amongst vendors. --> + <xsd:element name="vendor-id" type="sdk:idType" /> + <!-- The displayed vendor name of the add-on. --> + <xsd:element name="vendor-display" type="xsd:normalizedString" /> + + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codenames' (a.k.a. API previews). --> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- An add-on can declare 0 or more libraries. + This element is mandatory but it can be empty. + --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. + DEPRECATED. TODO remove in sdk-addon-5. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- Optional information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <xsd:simpleType name="idType"> + <xsd:annotation> + <xsd:documentation> + An ID string for an addon/extra name-id or vendor-id + can only be simple alphanumeric string. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_-]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a layout library used by an addon. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in an addon. + .</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/extras/vendor/path. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The displayed name of the extra. --> + <xsd:element name="name-display" type="xsd:normalizedString" /> + + <!-- The internal vendor id of the extra. Must be unique amongst vendors. --> + <xsd:element name="vendor-id" type="sdk:idType" /> + <!-- The displayed vendor name of the extra. --> + <xsd:element name="vendor-display" type="xsd:normalizedString" /> + + <!-- The install path sub-folder name. It must not be empty. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- A semi-colon separated list of "obsolete" path names which are equivalent + to the current 'path' name. When a package is seen using an old-paths' name, + the package manager will try to upgrade it to the new path. --> + <xsd:element name="old-paths" type="sdk:segmentListType" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. It must not be empty. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addon-5.xsd b/repository/sdk-addon-5.xsd new file mode 100755 index 0000000..546b00d --- /dev/null +++ b/repository/sdk-addon-5.xsd @@ -0,0 +1,442 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addon/5" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/addon/5" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r8. It is split out of the + main SDK Repository XML Schema and can only contain <addon> and + <extra> packages. + + - v2 is used by the SDK Updater in Tools r12. + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <addon> element now has an optional <layoutlib> that indicates the API + and revision of the layout library for this particular add-on, if any. + + - v3 is used by the SDK Manager in Tools r14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + + - v4 is used by the SDK Manager in Tools r18: + - <extra> and <addon> are not in the Repository XSD v6 anymore. + - <extra> get a new field <name-display>, which is used by the SDK Manager to + customize the name of the extra in the list display. The single <vendor> + field becomes <vendor-id> and <vendor-display>, the id being used internally + and the display in the UI. + - <addon> does the same, where <name> is replaced by <name-id> and <name-display> + and <vendor> is replaced by <vendor-id> and <vendor-display>. + + - v5 is used by the SDK Manager in Tools r20: + - The <beta-rc> element is no longer supported. It was never implemented anyway. + - For <tool> and <platform-tool> packages, the <revision> element becomes a + a "full revision" element with <major>, <minor>, <micro> and <preview> sub-elements. + - <min-tools-rev> for <extra> becomes a full revision element. + --> + + <xsd:element name="sdk-addon" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="add-on" type="sdk:addonType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The internal name id of the add-on. Must be unique per vendor. --> + <xsd:element name="name-id" type="sdk:idType" /> + <!-- The displayed name of the add-on. --> + <xsd:element name="name-display" type="xsd:normalizedString" /> + + <!-- The internal vendor id of the add-on. Must be unique amongst vendors. --> + <xsd:element name="vendor-id" type="sdk:idType" /> + <!-- The displayed vendor name of the add-on. --> + <xsd:element name="vendor-display" type="xsd:normalizedString" /> + + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codenames' (a.k.a. API previews). --> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- An add-on can declare 0 or more libraries. + This element is mandatory but it can be empty. + --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- Optional information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <xsd:simpleType name="idType"> + <xsd:annotation> + <xsd:documentation> + An ID string for an addon/extra name-id or vendor-id + can only be simple alphanumeric string. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_-]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a layout library used by an addon. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in an addon. + .</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/extras/vendor/path. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The displayed name of the extra. --> + <xsd:element name="name-display" type="xsd:normalizedString" /> + + <!-- The internal vendor id of the extra. Must be unique amongst vendors. --> + <xsd:element name="vendor-id" type="sdk:idType" /> + <!-- The displayed vendor name of the extra. --> + <xsd:element name="vendor-display" type="xsd:normalizedString" /> + + <!-- The install path sub-folder name. It must not be empty. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- A semi-colon separated list of "obsolete" path names which are equivalent + to the current 'path' name. When a package is seen using an old-paths' name, + the package manager will try to upgrade it to the new path. --> + <xsd:element name="old-paths" type="sdk:segmentListType" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be a revision element. --> + <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- A full revision, with a major.minor.micro and an optional preview number. + The major number is mandatory, the other elements are optional. + --> + + <xsd:complexType name="revisionType"> + <xsd:annotation> + <xsd:documentation> + A full revision, with a major.minor.micro and an + optional preview number. The major number is mandatory. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The major revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="major" type="xsd:positiveInteger" /> + <!-- The minor revision, an int >= 0, incremented each time a new + minor package is generated. Assumed to be 0 if missing. --> + <xsd:element name="minor" type="xsd:nonNegativeInteger" minOccurs="0" /> + <!-- The micro revision, an int >= 0, incremented each time a new + buf fix is generated. Assumed to be 0 if missing. --> + <xsd:element name="micro" type="xsd:nonNegativeInteger" minOccurs="0" /> + <!-- The preview/release candidate revision, an int > 0, + incremented each time a new preview is generated. + Not present for final releases. --> + <xsd:element name="preview" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. It must not be empty. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addons-list-1.xsd b/repository/sdk-addons-list-1.xsd new file mode 100755 index 0000000..176fb60 --- /dev/null +++ b/repository/sdk-addons-list-1.xsd @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addons-list/1" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sa1="http://schemas.android.com/sdk/android/addons-list/1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- + A simple list of add-ons sites that is loaded by default by the SDK Manager. + --> + + <xsd:element name="sdk-addons-list" type="sa1:addonsListType" /> + + <xsd:complexType name="addonsListType"> + <xsd:annotation> + <xsd:documentation> + A simple list of add-ons site. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="addon-site" type="sa1:addonSiteType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an Add-on Site. --> + + <xsd:complexType name="addonSiteType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on site.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The URL of the site. + + This can be either the exact URL of the an XML resource conforming + to the latest sdk-addon-N.xsd schema, or it can be the URL of a + 'directory', in which case the manager will look for a resource + named 'addon.xml' at this location. + + Examples: + http://www.example.com/android/my_addons.xml + or + http://www.example.com/android/ + + In the second example, the manager will actually look for: + http://www.example.com/android/addon.xml + --> + <xsd:element name="url" type="xsd:token" /> + + <!-- The UI-visible name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + </xsd:all> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-addons-list-2.xsd b/repository/sdk-addons-list-2.xsd new file mode 100755 index 0000000..dde7214 --- /dev/null +++ b/repository/sdk-addons-list-2.xsd @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/addons-list/2" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sa1="http://schemas.android.com/sdk/android/addons-list/2" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- + A simple list of add-ons sites that is loaded by default by the SDK Manager. + + - v1: Defines <addon-site> + - v2: Adds support for <sys-img-site> + --> + + <xsd:element name="sdk-addons-list" type="sa1:addonsListType" /> + + <xsd:complexType name="addonsListType"> + <xsd:annotation> + <xsd:documentation> + A simple list of add-ons site. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="addon-site" type="sa1:addonSiteType" /> + <xsd:element name="sys-img-site" type="sa1:sysImgSiteType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an Add-on Site. --> + + <xsd:complexType name="addonSiteType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on site.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The URL of the site. + + This can be either the exact URL of the an XML resource conforming + to the latest sdk-addon-N.xsd schema, or it can be the URL of a + 'directory', in which case the manager will look for a resource + named 'addon.xml' at this location. + + Examples: + http://www.example.com/android/my_addons.xml + or + http://www.example.com/android/ + + In the second example, the manager will actually look for: + http://www.example.com/android/addon.xml + --> + <xsd:element name="url" type="xsd:token" /> + + <!-- The UI-visible name of the add-on site. --> + <xsd:element name="name" type="xsd:normalizedString" /> + + </xsd:all> + </xsd:complexType> + + <!-- The definition of an Sys-Img Site. --> + + <xsd:complexType name="sysImgSiteType"> + <xsd:annotation> + <xsd:documentation>An SDK sys-img site.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The URL of the site. + + This can be either the exact URL of the an XML resource conforming + to the latest sdk-sys-img-N.xsd schema, or it can be the URL of a + 'directory', in which case the manager will look for a resource + named 'sysimg.xml' at this location. + + Examples: + http://www.example.com/android/my_sys_img.xml + or + http://www.example.com/android/ + + In the second example, the manager will actually look for: + http://www.example.com/android/sysimg.xml + --> + <xsd:element name="url" type="xsd:token" /> + + <!-- The UI-visible name of the sys-img site. --> + <xsd:element name="name" type="xsd:normalizedString" /> + + </xsd:all> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-1.xsd b/repository/sdk-repository-1.xsd new file mode 100755 index 0000000..38ec309 --- /dev/null +++ b/repository/sdk-repository-1.xsd @@ -0,0 +1,381 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/1" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and Tools r4. + --> + + <xsd:element name="sdk-repository"> + <xsd:annotation> + <xsd:documentation> + The repository contains collections of downloadable packages. + </xsd:documentation> + </xsd:annotation> + + <xsd:complexType> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + + <!-- The definition of an SDK platform package. --> + + <xsd:element name="platform"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + + + <!-- The definition of an SDK Add-on package. --> + + <xsd:element name="add-on"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:all> + <!-- The name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The vendor of the add-on. --> + <xsd:element name="vendor" type="xsd:normalizedString" /> + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codename' (a.k.a. API previews). --> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An add-on can declare 0 or more libraries. --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:all> + </xsd:complexType> + </xsd:element> + + + <!-- The definition of an SDK tool package. --> + + <xsd:element name="tool"> + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + + + <!-- The definition of an SDK doc package. --> + + <xsd:element name="doc"> + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content and specifies in which fixed root directory it must be + installed. + --> + + <xsd:element name="extra"> + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" + content and specifies in which fixed root directory it must be + installed. + The paths "add-ons", "platforms", "tools" and "docs" are + reserved and cannot be used. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:all> + <!-- The install folder name. It must be a single-segment path. + The paths "add-ons", "platforms", "tools" and "docs" are + reserved and cannot be used. + --> + <xsd:element name="path"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[^/\\]+"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:licenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:element name="license"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + +</xsd:schema> diff --git a/repository/sdk-repository-2.xsd b/repository/sdk-repository-2.xsd new file mode 100755 index 0000000..ecadc3f --- /dev/null +++ b/repository/sdk-repository-2.xsd @@ -0,0 +1,438 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/2" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sr2="http://schemas.android.com/sdk/android/repository/2" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + - v2 is used by the SDK Updater in Tools r5: + - new <sample> repository type. + - new <obsolete> in all repository types. + --> + + <xsd:element name="sdk-repository" type="sr2:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sr2:platformType" /> + <xsd:element name="add-on" type="sr2:addonType" /> + <xsd:element name="tool" type="sr2:toolType" /> + <xsd:element name="doc" type="sr2:docType" /> + <xsd:element name="sample" type="sr2:sampleType" /> + <xsd:element name="extra" type="sr2:extraType" /> + <xsd:element name="license" type="sr2:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK Add-on package. --> + + <xsd:complexType name="addonType"> + <xsd:annotation> + <xsd:documentation>An SDK add-on package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The name of the add-on. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The vendor of the add-on. --> + <xsd:element name="vendor" type="xsd:normalizedString" /> + <!-- The Android API Level for the add-on. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- Note: Add-ons do not support 'codename' (a.k.a. API previews). --> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An add-on can declare 0 or more libraries. --> + + <xsd:element name="libs"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="lib"> + <xsd:complexType> + <xsd:all> + <!-- The name of the library. --> + <xsd:element name="name" type="xsd:normalizedString" /> + <!-- The optional description of this add-on library. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content and specifies in which fixed root directory it must be + installed. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" + content and specifies in which fixed root directory it must be + installed. + The paths "add-ons", "platforms", "tools" and "docs" are + reserved and cannot be used. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The install folder name. It must be a single-segment path. + The paths "add-ons", "platforms", "tools" and "docs" are + reserved and cannot be used. + --> + <xsd:element name="path"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[^/\\]+"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sr2:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sr2:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sr2:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sr2:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-3.xsd b/repository/sdk-repository-3.xsd new file mode 100755 index 0000000..75d8541 --- /dev/null +++ b/repository/sdk-repository-3.xsd @@ -0,0 +1,436 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/3" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/3" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + + - v2 is used by the SDK Updater in Tools r5: + - It introduces a new <sample> repository type. Previously samples + were included in the <platform> packages. Instead this package is used + and and the samples are installed in $SDK/samples. + - All repository types have a new <obsolete> node. It works as a marker + to indicate the package is obsolete and should not be selected by default. + The UI also hides these out by default. + + - v3 is used by the SDK Updater in Tools r8: + - It introduces a new <platform-tool> repository type. Previously platform-specific + tools were included in the <platform> packages. Instead this package is used + and platform-specific tools are installed in $SDK/platform-tools + - There's a new element <min-platform-tools-rev> in <tool>. The tool package now + requires that at least some minimal version of <platform-tool> be installed. + - It removes the <addon> repository type, which is now in its own XML Schema. + --> + + <xsd:element name="sdk-repository" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sdk:platformType" /> + <xsd:element name="tool" type="sdk:toolType" /> + <xsd:element name="platform-tool" type="sdk:platformToolType" /> + <xsd:element name="doc" type="sdk:docType" /> + <xsd:element name="sample" type="sdk:sampleType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- The minimal revision of platform-tools required by this package. + Mandatory. Must be an int > 0. --> + <xsd:element name="min-platform-tools-rev" type="xsd:positiveInteger" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK platform-tool package. --> + + <xsd:complexType name="platformToolType" > + <xsd:annotation> + <xsd:documentation>An SDK platform-tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-4.xsd b/repository/sdk-repository-4.xsd new file mode 100755 index 0000000..9b14772 --- /dev/null +++ b/repository/sdk-repository-4.xsd @@ -0,0 +1,500 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/4" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/4" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + + - v2 is used by the SDK Updater in Tools r5: + - It introduces a new <sample> repository type. Previously samples + were included in the <platform> packages. Instead this package is used + and and the samples are installed in $SDK/samples. + - All repository types have a new <obsolete> node. It works as a marker + to indicate the package is obsolete and should not be selected by default. + The UI also hides these out by default. + + - v3 is used by the SDK Updater in Tools r8: + - It introduces a new <platform-tool> repository type. Previously platform-specific + tools were included in the <platform> packages. Instead this package is used + and platform-specific tools are installed in $SDK/platform-tools + - There's a new element <min-platform-tools-rev> in <tool>. The tool package now + requires that at least some minimal version of <platform-tool> be installed. + - It removes the <addon> repository type, which is now in its own XML Schema. + + - v4 is used by the SDK Updater in Tools r12: + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <platform> element now has a mandatory <layoutlib> that indicates the API + and revision of that layout library for this particular platform. + --> + + <xsd:element name="sdk-repository" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sdk:platformType" /> + <xsd:element name="tool" type="sdk:toolType" /> + <xsd:element name="platform-tool" type="sdk:platformToolType" /> + <xsd:element name="doc" type="sdk:docType" /> + <xsd:element name="sample" type="sdk:sampleType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- Information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by a platform. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- The minimal revision of platform-tools required by this package. + Mandatory. Must be an int > 0. --> + <xsd:element name="min-platform-tools-rev" type="xsd:positiveInteger" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK platform-tool package. --> + + <xsd:complexType name="platformToolType" > + <xsd:annotation> + <xsd:documentation>An SDK platform-tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + + Important implementation detail: this element is duplicated in the + sdk-addon-N.xsd schema and must be kept in sync there. This is + simpler than trying to use some kind of of include or to request + that clients use a third XML schema for common parts. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-5.xsd b/repository/sdk-repository-5.xsd new file mode 100755 index 0000000..ae8275f --- /dev/null +++ b/repository/sdk-repository-5.xsd @@ -0,0 +1,624 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/5" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/5" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + + - v2 is used by the SDK Updater in Tools r5: + - It introduces a new <sample> repository type. Previously samples + were included in the <platform> packages. Instead this package is used + and and the samples are installed in $SDK/samples. + - All repository types have a new <obsolete> node. It works as a marker + to indicate the package is obsolete and should not be selected by default. + The UI also hides these out by default. + + - v3 is used by the SDK Updater in Tools r8: + - It introduces a new <platform-tool> repository type. Previously platform-specific + tools were included in the <platform> packages. Instead this package is used + and platform-specific tools are installed in $SDK/platform-tools + - There's a new element <min-platform-tools-rev> in <tool>. The tool package now + requires that at least some minimal version of <platform-tool> be installed. + - It removes the <addon> repository type, which is now in its own XML Schema. + + - v4 is used by the SDK Updater in Tools r12: + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <platform> element now has a mandatory <layoutlib> that indicates the API + and revision of that layout library for this particular platform. + + - v5 is used by the SDK Updater in Tools R14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + - <platform> has a new optional <abi-included> that describes the ABI of the + system image included in the platform, if any. + - New <system-image> package type, to store system images outside of <platform>s. + - New <source> package type. + --> + + <xsd:element name="sdk-repository" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sdk:platformType" /> + <xsd:element name="system-image" type="sdk:systemImageType" /> + <xsd:element name="source" type="sdk:sourceType" /> + <xsd:element name="tool" type="sdk:toolType" /> + <xsd:element name="platform-tool" type="sdk:platformToolType" /> + <xsd:element name="doc" type="sdk:docType" /> + <xsd:element name="sample" type="sdk:sampleType" /> + <xsd:element name="extra" type="sdk:extraType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- Information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- The ABI of the system image *included* in this platform, if any. + When the field is present, it means the platform already embeds one + system image. A platform can also have any number of external + <system-image> associated with it. --> + <xsd:element name="included-abi" type="sdk:abiType" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by a platform. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a system image used by a platform. --> + + <xsd:complexType name="systemImageType" > + <xsd:annotation> + <xsd:documentation> + System Image for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this system image belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The ABI of the system emulated by this image. --> + <xsd:element name="abi" type="sdk:abiType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + </xsd:all> + </xsd:complexType> + + <!-- The definition of the ABI supported by a platform's system image. --> + + <xsd:simpleType name="abiType"> + <xsd:annotation> + <xsd:documentation>The ABI of a platform's system image.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="armeabi" /> + <xsd:enumeration value="armeabi-v7a" /> + <xsd:enumeration value="x86" /> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a source package. --> + + <xsd:complexType name="sourceType" > + <xsd:annotation> + <xsd:documentation> + Sources for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this source belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- The minimal revision of platform-tools required by this package. + Mandatory. Must be an int > 0. --> + <xsd:element name="min-platform-tools-rev" type="xsd:positiveInteger" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK platform-tool package. --> + + <xsd:complexType name="platformToolType" > + <xsd:annotation> + <xsd:documentation>An SDK platform-tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK extra package. This kind of package is for + "free" content. Such packages are installed in SDK/vendor/path. + + Important implementation detail: this element is duplicated in the + sdk-addon-N.xsd schema and must be kept in sync there. This is + simpler than trying to use some kind of of include or to request + that clients use a third XML schema for common parts. + --> + + <xsd:complexType name="extraType" > + <xsd:annotation> + <xsd:documentation> + An SDK extra package. This kind of package is for "free" content. + Such packages are installed in SDK/vendor/path. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + + <!-- The install path top folder name. + The segments "add-ons", "docs", "platforms", "platform-tools", "temp" + and "tools" are reserved and cannot be used. + --> + <xsd:element name="vendor" type="sdk:segmentType" /> + + <!-- The install path sub-folder name. --> + <xsd:element name="path" type="sdk:segmentType" /> + + <!-- A semi-colon separated list of "obsolete" path names which are equivalent + to the current 'path' name. When a package is seen using an old-paths' name, + the package manager will try to upgrade it to the new path. --> + <xsd:element name="old-paths" type="sdk:segmentListType" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + <!-- The minimal API level required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-api-level" type="xsd:positiveInteger" minOccurs="0" /> + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- A list of project files contributed by this package. Optional. --> + <xsd:element name="project-files" type="sdk:projectFilesType" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-6.xsd b/repository/sdk-repository-6.xsd new file mode 100755 index 0000000..bccce69 --- /dev/null +++ b/repository/sdk-repository-6.xsd @@ -0,0 +1,608 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/6" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/6" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + + - v2 is used by the SDK Updater in Tools r5: + - It introduces a new <sample> repository type. Previously samples + were included in the <platform> packages. Instead this package is used + and and the samples are installed in $SDK/samples. + - All repository types have a new <obsolete> node. It works as a marker + to indicate the package is obsolete and should not be selected by default. + The UI also hides these out by default. + + - v3 is used by the SDK Updater in Tools r8: + - It introduces a new <platform-tool> repository type. Previously platform-specific + tools were included in the <platform> packages. Instead this package is used + and platform-specific tools are installed in $SDK/platform-tools + - There's a new element <min-platform-tools-rev> in <tool>. The tool package now + requires that at least some minimal version of <platform-tool> be installed. + - It removes the <addon> repository type, which is now in its own XML Schema. + + - v4 is used by the SDK Updater in Tools r12: + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <platform> element now has a mandatory <layoutlib> that indicates the API + and revision of that layout library for this particular platform. + + - v5 is used by the SDK Manager in Tools r14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + - <platform> has a new optional <abi-included> that describes the ABI of the + system image included in the platform, if any. + - New <system-image> package type, to store system images outside of <platform>s. + - New <source> package type. + + - v6 is used by the SDK Manager in Tools r18: + - <extra> packages are removed. They are served only by the addon XML. + - <platform>, <system-image>, <source>, <tool>, <platform-tool>, <doc> + and <sample> get a new optional field <beta-rc> which can be used to indicate + the package is a Beta Release Candidate and not a final release. + --> + + <xsd:element name="sdk-repository" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sdk:platformType" /> + <xsd:element name="system-image" type="sdk:systemImageType" /> + <xsd:element name="source" type="sdk:sourceType" /> + <xsd:element name="tool" type="sdk:toolType" /> + <xsd:element name="platform-tool" type="sdk:platformToolType" /> + <xsd:element name="doc" type="sdk:docType" /> + <xsd:element name="sample" type="sdk:sampleType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- Information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + <!-- The ABI of the system image *included* in this platform, if any. + When the field is present, it means the platform already embeds one + system image. A platform can also have any number of external + <system-image> associated with it. --> + <xsd:element name="included-abi" type="sdk:abiType" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by a platform. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a system image used by a platform. --> + + <xsd:complexType name="systemImageType" > + <xsd:annotation> + <xsd:documentation> + System Image for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this system image belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The ABI of the system emulated by this image. --> + <xsd:element name="abi" type="sdk:abiType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + <!-- The definition of the ABI supported by a platform's system image. --> + + <xsd:simpleType name="abiType"> + <xsd:annotation> + <xsd:documentation>The ABI of a platform's system image.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="armeabi" /> + <xsd:enumeration value="armeabi-v7a" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="mips" /> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a source package. --> + + <xsd:complexType name="sourceType" > + <xsd:annotation> + <xsd:documentation> + Sources for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this source belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- The minimal revision of platform-tools required by this package. + Mandatory. Must be an int > 0. --> + <xsd:element name="min-platform-tools-rev" type="xsd:positiveInteger" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK platform-tool package. --> + + <xsd:complexType name="platformToolType" > + <xsd:annotation> + <xsd:documentation>An SDK platform-tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be an int > 0. --> + <xsd:element name="min-tools-rev" type="xsd:positiveInteger" minOccurs="0" /> + + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + + <!-- An optional element indicating the package is a beta/preview. + When present, it indicates the release-candidate number. + When the element is absent, it indicates this is a released package. --> + <xsd:element name="beta-rc" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-repository-7.xsd b/repository/sdk-repository-7.xsd new file mode 100755 index 0000000..ea18070 --- /dev/null +++ b/repository/sdk-repository-7.xsd @@ -0,0 +1,612 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/repository/7" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/repository/7" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android SDK repository is a web site that contains a "repository.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r3 and r4. + + - v2 is used by the SDK Updater in Tools r5: + - It introduces a new <sample> repository type. Previously samples + were included in the <platform> packages. Instead this package is used + and and the samples are installed in $SDK/samples. + - All repository types have a new <obsolete> node. It works as a marker + to indicate the package is obsolete and should not be selected by default. + The UI also hides these out by default. + + - v3 is used by the SDK Updater in Tools r8: + - It introduces a new <platform-tool> repository type. Previously platform-specific + tools were included in the <platform> packages. Instead this package is used + and platform-specific tools are installed in $SDK/platform-tools + - There's a new element <min-platform-tools-rev> in <tool>. The tool package now + requires that at least some minimal version of <platform-tool> be installed. + - It removes the <addon> repository type, which is now in its own XML Schema. + + - v4 is used by the SDK Updater in Tools r12: + - <extra> element now has a <project-files> element that contains 1 or + or more <path>, each indicating the relative path of a file that this package + can contribute to installed projects. + - <platform> element now has a mandatory <layoutlib> that indicates the API + and revision of that layout library for this particular platform. + + - v5 is used by the SDK Manager in Tools r14: + - <extra> now has an <old-paths> element, a ;-separated list of old paths that + should be detected and migrated to the new <path> for that package. + - <platform> has a new optional <abi-included> that describes the ABI of the + system image included in the platform, if any. + - New <system-image> package type, to store system images outside of <platform>s. + - New <source> package type. + + - v6 is used by the SDK Manager in Tools r18: + - <extra> packages are removed. They are served only by the addon XML. + - <platform>, <system-image>, <source>, <tool>, <platform-tool>, <doc> + and <sample> get a new optional field <beta-rc> which can be used to indicate + the package is a Beta Release Candidate and not a final release. + + - v7 is used by the SDK Manager in Tools r20: + - For <tool> and <platform-tool> packages, the <revision> element becomes a + a "full revision" element with <major>, <minor>, <micro> and <preview> sub-elements. + - The <beta-rc> element is no longer supported, it is replaced by + <revision> -> <preview> and is only for <tool> and <platform-tool> packages. + - <min-tools-rev> and <min-platform-tools-rev> also become a full revision element. + --> + + <xsd:element name="sdk-repository" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable packages. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="sdk:platformType" /> + <xsd:element name="system-image" type="sdk:systemImageType" /> + <xsd:element name="source" type="sdk:sourceType" /> + <xsd:element name="tool" type="sdk:toolType" /> + <xsd:element name="platform-tool" type="sdk:platformToolType" /> + <xsd:element name="doc" type="sdk:docType" /> + <xsd:element name="sample" type="sdk:sampleType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + <!-- The definition of an SDK platform package. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>An SDK platform package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android platform version. It is string such as "1.0". --> + <xsd:element name="version" type="xsd:normalizedString" /> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- Information on the layoutlib packaged in this platform. --> + <xsd:element name="layoutlib" type="sdk:layoutlibType" /> + + <!-- optional elements --> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be a revision element. --> + <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" /> + + <!-- The ABI of the system image *included* in this platform, if any. + When the field is present, it means the platform already embeds one + system image. A platform can also have any number of external + <system-image> associated with it. --> + <xsd:element name="included-abi" type="sdk:abiType" minOccurs="0" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a layout library used by a platform. --> + + <xsd:complexType name="layoutlibType" > + <xsd:annotation> + <xsd:documentation> + Version information for a layoutlib included in a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The layoutlib API level, an int > 0, + incremented with each new incompatible lib. --> + <xsd:element name="api" type="xsd:positiveInteger" /> + <!-- The incremental minor revision for that API, e.g. in case of bug fixes. + Optional. An int >= 0, assumed to be 0 if the element is missing. --> + <xsd:element name="revision" type="xsd:nonNegativeInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a system image used by a platform. --> + + <xsd:complexType name="systemImageType" > + <xsd:annotation> + <xsd:documentation> + System Image for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this system image belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The ABI of the system emulated by this image. --> + <xsd:element name="abi" type="sdk:abiType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of the ABI supported by a platform's system image. --> + + <xsd:simpleType name="abiType"> + <xsd:annotation> + <xsd:documentation>The ABI of a platform's system image.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="armeabi" /> + <xsd:enumeration value="armeabi-v7a" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="mips" /> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a source package. --> + + <xsd:complexType name="sourceType" > + <xsd:annotation> + <xsd:documentation> + Sources for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level + codename identifies the platform to which this source belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK tool package. --> + + <xsd:complexType name="toolType" > + <xsd:annotation> + <xsd:documentation>An SDK tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The full revision (major.minor.micro.preview), incremented each + time a new package is generated. --> + <xsd:element name="revision" type="sdk:revisionType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- The minimal revision of platform-tools required by this package. + Mandatory. Must be a revision element. --> + <xsd:element name="min-platform-tools-rev" type="sdk:revisionType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK platform-tool package. --> + + <xsd:complexType name="platformToolType" > + <xsd:annotation> + <xsd:documentation>An SDK platform-tool package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The full revision (major.minor.micro.preview), incremented each + time a new package is generated. --> + <xsd:element name="revision" type="sdk:revisionType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK doc package. --> + + <xsd:complexType name="docType" > + <xsd:annotation> + <xsd:documentation>An SDK doc package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of an SDK sample package. --> + + <xsd:complexType name="sampleType" > + <xsd:annotation> + <xsd:documentation>An SDK sample package.</xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the documentation. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this doc, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + <!-- The minimal revision of tools required by this package. + Optional. If present, must be a revision element. --> + <xsd:element name="min-tools-rev" type="sdk:revisionType" minOccurs="0" /> + + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of a path segment used by the extra element. --> + + <xsd:simpleType name="segmentType"> + <xsd:annotation> + <xsd:documentation> + One path segment for the install path of an extra element. + It must be a single-segment path. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="segmentListType"> + <xsd:annotation> + <xsd:documentation> + A semi-colon separated list of a segmentTypes. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:pattern value="[a-zA-Z0-9_;]+"/> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- A full revision, with a major.minor.micro and an optional preview number. + The major number is mandatory, the other elements are optional. + --> + + <xsd:complexType name="revisionType"> + <xsd:annotation> + <xsd:documentation> + A full revision, with a major.minor.micro and an + optional preview number. The major number is mandatory. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The major revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="major" type="xsd:positiveInteger" /> + <!-- The minor revision, an int >= 0, incremented each time a new + minor package is generated. Assumed to be 0 if missing. --> + <xsd:element name="minor" type="xsd:nonNegativeInteger" minOccurs="0" /> + <!-- The micro revision, an int >= 0, incremented each time a new + buf fix is generated. Assumed to be 0 if missing. --> + <xsd:element name="micro" type="xsd:nonNegativeInteger" minOccurs="0" /> + <!-- The preview/release candidate revision, an int > 0, + incremented each time a new preview is generated. + Not present for final releases. --> + <xsd:element name="preview" type="xsd:positiveInteger" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + --> + + <xsd:complexType name="projectFilesType"> + <xsd:annotation> + <xsd:documentation> + A collection of file paths available in an <extra> package + that can be installed in an Android project. + If present, the <project-files> collection must contain at least one path. + Each path is relative to the root directory of the package. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One JAR Path, relative to the root folder of the package. --> + <xsd:element name="path" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> diff --git a/repository/sdk-stats-1.xsd b/repository/sdk-stats-1.xsd new file mode 100755 index 0000000..2944b12 --- /dev/null +++ b/repository/sdk-stats-1.xsd @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/stats/1" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ast="http://schemas.android.com/sdk/android/stats/1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- + A simple list of platforms provided by the SDK Manager and some + statistics on them, namely the market share percentage for that + platform. + This can be used by the SDK Manager or the ADT New Project Wizard + to give users an idea of the relative install base of platforms. + + Scope, Caveat & Limitation: + The "share percentage" corresponds to the Platform Versions table + from the SDK Dashboard as seen at + http://developer.android.com/resources/dashboard/platform-versions.html + However the data is not automatically generated and there is NO + freshness implied. The values may or may not be up-to-date and it is + most likely they will only get refreshed when there's a significant + change that affects the usage of the SDK tools. + + => The data is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES + OR CONDITIONS OF ANY KIND, either express or implied. + --> + + <xsd:element name="sdk-stats" type="ast:platformsListType" /> + + <xsd:complexType name="platformsListType"> + <xsd:annotation> + <xsd:documentation> + A simple list of platform stats. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="platform" type="ast:platformType" /> + </xsd:choice> + </xsd:complexType> + + + <!-- The definition of stats for a platform. --> + + <xsd:complexType name="platformType"> + <xsd:annotation> + <xsd:documentation>Stats information for a given Android platform. + The api-level acts as a key, and it is epxected there should only + be one platform listed with the same API-level. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + + <!-- The official codename for this platform, for example "Cupcake". --> + <xsd:element name="codename" type="xsd:normalizedString" /> + + <!-- The official version name of this platform, for example "Android 1.5". --> + <xsd:element name="version" type="xsd:normalizedString" /> + + <!-- An approximate share percentage of this platform. --> + <xsd:element name="share" type="ast:percent" /> + </xsd:all> + </xsd:complexType> + + + <!-- A decimal percentage, between 0.0 and 100.0% --> + + <xsd:simpleType name="percent" id="percent"> + <xsd:annotation> + <xsd:documentation>A decimal percentage, between 0.0 and 100.0%.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:decimal"> + <xsd:minInclusive value="0"/> + <xsd:maxInclusive value="100"/> + </xsd:restriction> + </xsd:simpleType> + +</xsd:schema> diff --git a/repository/sdk-sys-img-1.xsd b/repository/sdk-sys-img-1.xsd new file mode 100755 index 0000000..a19aa49 --- /dev/null +++ b/repository/sdk-sys-img-1.xsd @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<xsd:schema + targetNamespace="http://schemas.android.com/sdk/android/sys-img/1" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/1" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1"> + + <!-- The repository contains a collection of downloadable items known as + "packages". Each package has a type and various attributes and contains + a list of file "archives" that can be downloaded for specific OSes. + + An Android Addon repository is a web site that contains an "addon.xml" + file that conforms to this XML Schema. + + History: + - v1 is used by the SDK Updater in Tools r20. It is split out of the + main SDK Repository XML Schema and can only contain <system-image> packages. + --> + + <xsd:element name="sdk-sys-img" type="sdk:repositoryType" /> + + <xsd:complexType name="repositoryType"> + <xsd:annotation> + <xsd:documentation> + The repository contains a collection of downloadable system images. + </xsd:documentation> + </xsd:annotation> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="system-image" type="sdk:systemImageType" /> + <xsd:element name="license" type="sdk:licenseType" /> + </xsd:choice> + </xsd:complexType> + + + <!-- The definition of a system image used by a platform. --> + + <xsd:complexType name="systemImageType" > + <xsd:annotation> + <xsd:documentation> + System Image for a platform. + </xsd:documentation> + </xsd:annotation> + <xsd:all> + <!-- api-level+codename identifies the platform to which this system image belongs. --> + + <!-- The Android API Level for the platform. An int > 0. --> + <xsd:element name="api-level" type="xsd:positiveInteger" /> + <!-- The optional codename for this platform, if it's a preview. --> + <xsd:element name="codename" type="xsd:string" minOccurs="0" /> + + <!-- The revision, an int > 0, incremented each time a new + package is generated. --> + <xsd:element name="revision" type="xsd:positiveInteger" /> + + <!-- The ABI of the system emulated by this image. --> + <xsd:element name="abi" type="sdk:abiType" /> + + <!-- The optional license of this package. If present, users will have + to agree to it before downloading. --> + <xsd:element name="uses-license" type="sdk:usesLicenseType" minOccurs="0" /> + <!-- The optional description of this package. --> + <xsd:element name="description" type="xsd:string" minOccurs="0" /> + <!-- The optional description URL of this package --> + <xsd:element name="desc-url" type="xsd:token" minOccurs="0" /> + <!-- The optional release note for this package. --> + <xsd:element name="release-note" type="xsd:string" minOccurs="0" /> + <!-- The optional release note URL of this package --> + <xsd:element name="release-url" type="xsd:token" minOccurs="0" /> + + <!-- A list of file archives for this package. --> + <xsd:element name="archives" type="sdk:archivesType" /> + + <!-- An optional element indicating the package is obsolete. + The string content is however currently not defined and ignored. --> + <xsd:element name="obsolete" type="xsd:string" minOccurs="0" /> + </xsd:all> + </xsd:complexType> + + + <!-- The definition of the ABI supported by a platform's system image. --> + + <xsd:simpleType name="abiType"> + <xsd:annotation> + <xsd:documentation>The ABI of a platform's system image.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="armeabi" /> + <xsd:enumeration value="armeabi-v7a" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="mips" /> + </xsd:restriction> + </xsd:simpleType> + + + <!-- The definition of a license to be referenced by the uses-license element. --> + + <xsd:complexType name="licenseType"> + <xsd:annotation> + <xsd:documentation> + A license definition. Such a license must be used later as a reference + using a uses-license element in one of the package elements. + </xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="id" type="xsd:ID" /> + <xsd:attribute name="type" type="xsd:token" fixed="text" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + + <!-- Type describing the license used by a package. + The license MUST be defined using a license node and referenced + using the ref attribute of the license element inside a package. + --> + + <xsd:complexType name="usesLicenseType"> + <xsd:annotation> + <xsd:documentation> + Describes the license used by a package. The license MUST be defined + using a license node and referenced using the ref attribute of the + license element inside a package. + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="ref" type="xsd:IDREF" /> + </xsd:complexType> + + + <!-- A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository elements and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + --> + + <xsd:complexType name="archivesType"> + <xsd:annotation> + <xsd:documentation> + A collection of files that can be downloaded for a given architecture. + The <archives> node is mandatory in the repository packages and the + collection must have at least one <archive> declared. + Each archive is a zip file that will be unzipped in a location that depends + on its package type. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence minOccurs="1" maxOccurs="unbounded"> + <!-- One archive file --> + <xsd:element name="archive"> + <xsd:complexType> + <!-- Properties of the archive file --> + <xsd:all> + <!-- The size in bytes of the archive to download. --> + <xsd:element name="size" type="xsd:positiveInteger" /> + <!-- The checksum of the archive file. --> + <xsd:element name="checksum" type="sdk:checksumType" /> + <!-- The URL is an absolute URL if it starts with http://, https:// + or ftp://. Otherwise it is relative to the parent directory that + contains this repository.xml --> + <xsd:element name="url" type="xsd:token" /> + </xsd:all> + + <!-- Attributes that identify the OS and architecture --> + <xsd:attribute name="os" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="linux" /> + <xsd:enumeration value="macosx" /> + <xsd:enumeration value="windows" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="arch" use="optional"> + <xsd:simpleType> + <xsd:restriction base="xsd:token"> + <xsd:enumeration value="any" /> + <xsd:enumeration value="ppc" /> + <xsd:enumeration value="x86" /> + <xsd:enumeration value="x86_64" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- The definition of a file checksum --> + + <xsd:simpleType name="sha1Number"> + <xsd:annotation> + <xsd:documentation>A SHA1 checksum.</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="([0-9a-fA-F]){40}"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="checksumType"> + <xsd:annotation> + <xsd:documentation>A file checksum, currently only SHA1.</xsd:documentation> + </xsd:annotation> + <xsd:simpleContent> + <xsd:extension base="sdk:sha1Number"> + <xsd:attribute name="type" type="xsd:token" fixed="sha1" /> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + +</xsd:schema> |