xref: /aosp_15_r20/prebuilts/devtools/repository/sdk-addons-list-2.xsd (revision 4bfccde5c7e9ea06f821db40ef0af54f6695c320)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Copyright (C) 2012 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16-->
17<xsd:schema
18    targetNamespace="http://schemas.android.com/sdk/android/addons-list/2"
19    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
20    xmlns:sa1="http://schemas.android.com/sdk/android/addons-list/2"
21    elementFormDefault="qualified"
22    attributeFormDefault="unqualified"
23    version="1">
24
25    <!--
26        A simple list of add-ons sites that is loaded by default by the SDK Manager.
27
28        - v1: Defines <addon-site>
29        - v2: Adds support for <sys-img-site>
30    -->
31
32    <xsd:element name="sdk-addons-list" type="sa1:addonsListType" />
33
34    <xsd:complexType name="addonsListType">
35        <xsd:annotation>
36            <xsd:documentation>
37                A simple list of add-ons site.
38            </xsd:documentation>
39        </xsd:annotation>
40        <xsd:choice minOccurs="0" maxOccurs="unbounded">
41            <xsd:element name="addon-site" type="sa1:addonSiteType" />
42            <xsd:element name="sys-img-site" type="sa1:sysImgSiteType" />
43        </xsd:choice>
44    </xsd:complexType>
45
46    <!-- The definition of an Add-on Site. -->
47
48    <xsd:complexType name="addonSiteType">
49        <xsd:annotation>
50            <xsd:documentation>An SDK add-on site.</xsd:documentation>
51        </xsd:annotation>
52        <xsd:all>
53            <!-- The URL of the site.
54
55                This can be either the exact URL of the an XML resource conforming
56                to the latest sdk-addon-N.xsd schema, or it can be the URL of a
57                'directory', in which case the manager will look for a resource
58                named 'addon.xml' at this location.
59
60                Examples:
61                    http://www.example.com/android/my_addons.xml
62                or
63                    http://www.example.com/android/
64
65                In the second example, the manager will actually look for:
66                    http://www.example.com/android/addon.xml
67            -->
68            <xsd:element name="url"  type="xsd:token" />
69
70            <!-- The UI-visible name of the add-on site. -->
71            <xsd:element name="name" type="xsd:normalizedString" />
72
73        </xsd:all>
74    </xsd:complexType>
75
76    <!-- The definition of an Sys-Img Site. -->
77
78    <xsd:complexType name="sysImgSiteType">
79        <xsd:annotation>
80            <xsd:documentation>An SDK sys-img site.</xsd:documentation>
81        </xsd:annotation>
82        <xsd:all>
83            <!-- The URL of the site.
84
85                This can be either the exact URL of the an XML resource conforming
86                to the latest sdk-sys-img-N.xsd schema, or it can be the URL of a
87                'directory', in which case the manager will look for a resource
88                named 'sysimg.xml' at this location.
89
90                Examples:
91                    http://www.example.com/android/my_sys_img.xml
92                or
93                    http://www.example.com/android/
94
95                In the second example, the manager will actually look for:
96                    http://www.example.com/android/sysimg.xml
97            -->
98            <xsd:element name="url"  type="xsd:token" />
99
100            <!-- The UI-visible name of the sys-img site. -->
101            <xsd:element name="name" type="xsd:normalizedString" />
102
103        </xsd:all>
104    </xsd:complexType>
105
106</xsd:schema>
107