Home | History | Annotate | Download | only in docs
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!-- Copyright (C) 2012 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 <schema xmlns="http://www.w3.org/2001/XMLSchema"
     17     xmlns:tns="http://schemas.android.com/service/camera/metadata/"
     18     targetNamespace="http://schemas.android.com/service/camera/metadata/"
     19     elementFormDefault="qualified">
     20 
     21     <element name="metadata" type="tns:MetadataType"></element>
     22 
     23     <complexType name="MetadataType">
     24         <sequence>
     25             <element name="tags" type="tns:TagsType" maxOccurs="1" minOccurs="0"></element>
     26             <element name="namespace" type="tns:NamespaceType"
     27                 maxOccurs="unbounded" minOccurs="1">
     28             </element>
     29         </sequence>
     30     </complexType>
     31 
     32     <complexType name="NamespaceType">
     33         <sequence>
     34             <element name="section" type="tns:SectionType" maxOccurs="unbounded" minOccurs="1"></element>
     35         </sequence>
     36         <attribute name="name" type="string" use="required"></attribute>
     37     </complexType>
     38 
     39     <complexType name="SectionType">
     40         <sequence>
     41             <choice maxOccurs="unbounded">
     42                 <element name="controls" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
     43                 <element name="static" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
     44                 <element name="dynamic" type="tns:SectionKindType" maxOccurs="unbounded" minOccurs="0"></element>
     45             </choice>
     46         </sequence>
     47         <attribute name="name" type="string" use="required"></attribute>
     48     </complexType>
     49 
     50     <complexType name="SectionKindType">
     51         <complexContent>
     52             <extension base="tns:BaseNamespaceOrSectionKindType">
     53             </extension>
     54         </complexContent>
     55     </complexType>
     56 
     57     <complexType name="InnerNamespaceType">
     58         <complexContent>
     59             <extension base="tns:BaseNamespaceOrSectionKindType">
     60                 <attribute name="name" type="string" use="required"></attribute>
     61             </extension>
     62         </complexContent>
     63     </complexType>
     64 
     65     <complexType name="BaseNamespaceOrSectionKindType">
     66         <sequence maxOccurs="unbounded">
     67             <choice>
     68                 <element name="namespace" type="tns:InnerNamespaceType"></element>
     69                 <element name="entry" type="tns:EntryType"></element>
     70                 <element name="clone" type="tns:CloneType"></element>
     71             </choice>
     72         </sequence>
     73     </complexType>
     74 
     75     <complexType name="TagsType">
     76         <sequence>
     77             <element name="tag" type="tns:TagType" maxOccurs="unbounded" minOccurs="0"></element>
     78         </sequence>
     79     </complexType>
     80 
     81     <complexType name="TagType">
     82         <simpleContent>
     83             <extension base="string">
     84                 <attribute name="id" type="string" use="required"></attribute>
     85             </extension>
     86         </simpleContent>
     87     </complexType>
     88 
     89     <group name="BaseEntryGroup">
     90         <sequence>
     91             <element name="description" type="string" maxOccurs="1"
     92                 minOccurs="0">
     93             </element>
     94             <element name="units" type="string" maxOccurs="1"
     95                 minOccurs="0">
     96             </element>
     97             <element name="range" type="string" maxOccurs="1"
     98                 minOccurs="0">
     99             </element>
    100             <element name="notes" type="string" maxOccurs="1"
    101                 minOccurs="0">
    102             </element>
    103 
    104             <element name="tag" type="tns:TagType" maxOccurs="unbounded"
    105                 minOccurs="0">
    106             </element>
    107         </sequence>
    108     </group>
    109 
    110     <complexType name="EntryType">
    111         <sequence>
    112             <element name="array" type="tns:ArrayType" maxOccurs="1" minOccurs="0"></element>
    113             <element name="enum" type="tns:EnumType" maxOccurs="1" minOccurs="0"></element>
    114             <element name="tuple" type="tns:TupleType" maxOccurs="1" minOccurs="0"></element>
    115 
    116             <group ref="tns:BaseEntryGroup" />
    117         </sequence>
    118 
    119         <attribute name="name" type="string" use="required" />
    120         <attribute name="type" use="required">
    121             <simpleType>
    122                 <restriction base="string">
    123                     <enumeration value="byte" />
    124                     <enumeration value="int32" />
    125                     <enumeration value="int64" />
    126                     <enumeration value="float" />
    127                     <enumeration value="double" />
    128                     <enumeration value="rational" />
    129                 </restriction>
    130             </simpleType>
    131         </attribute>
    132         <attribute name="type_notes" type="string" />
    133         <attribute name="container">
    134             <simpleType>
    135                 <restriction base="string">
    136                     <enumeration value="array" />
    137                     <enumeration value="tuple" />
    138                 </restriction>
    139             </simpleType>
    140         </attribute>
    141         <attribute name="enum">
    142             <simpleType>
    143                 <restriction base="string">
    144                     <enumeration value="true"></enumeration>
    145                     <enumeration value="false"></enumeration>
    146                 </restriction>
    147             </simpleType>
    148         </attribute>
    149     </complexType>
    150 
    151     <complexType name="EnumType">
    152         <sequence>
    153             <element name="value" type="tns:EnumValueType" maxOccurs="unbounded"></element>
    154         </sequence>
    155     </complexType>
    156 
    157     <complexType name="TupleType">
    158         <sequence>
    159             <element name="value" type="string" minOccurs="1" maxOccurs="unbounded"></element>
    160         </sequence>
    161     </complexType>
    162 
    163     <complexType name="ArrayType">
    164         <sequence>
    165             <element name="size" type="string" minOccurs="1" maxOccurs="unbounded"></element>
    166         </sequence>
    167     </complexType>
    168 
    169     <complexType name="EnumValueType" mixed="true">
    170 
    171         <sequence>
    172             <element name="notes" type="string" minOccurs="0" maxOccurs="1" />
    173         </sequence>
    174 
    175         <attribute name="optional">
    176             <simpleType>
    177                 <restriction base="string">
    178                     <enumeration value="true"></enumeration>
    179                     <enumeration value="false"></enumeration>
    180                 </restriction>
    181             </simpleType>
    182         </attribute>
    183         <attribute name="id" type="string" />
    184     </complexType>
    185 
    186     <complexType name="CloneType">
    187         <sequence>
    188                 <group ref="tns:BaseEntryGroup" />
    189         </sequence>
    190 
    191         <!--
    192              the semantic correctness of the next 2 attributes
    193              are validated by metadata_validate.py
    194 
    195              due to the inability of XSD to generate paths recursively
    196         -->
    197         <attribute name="entry">
    198         </attribute>
    199         <attribute name="kind">
    200             <simpleType>
    201                 <restriction base="string">
    202                     <enumeration value="controls"></enumeration>
    203                     <enumeration value="static"></enumeration>
    204                     <enumeration value="dynamic"></enumeration>
    205                 </restriction>
    206             </simpleType>
    207         </attribute>
    208     </complexType>
    209 </schema>
    210