Fixed package version
[platform/framework/web/wrt-installer.git] / configuration / packaging-configuration.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/ns/widgets" xmlns:widgets="http://www.w3.org/ns/widgets">
3   <xs:import schemaLocation="common.xsd"/>
4   <xs:import namespace="http://tizen.org/ns/widgets" schemaLocation="widgets.tizen.xsd"/>
5   <!--
6     Widget Packaging and Configuration <http://www.w3.org/TR/widgets/>
7     requires common.rnc
8   -->
9   <xs:element name="widget">
10     <xs:complexType>
11       <xs:complexContent>
12         <xs:extension base="widgets:group.widgetContent">
13           <xs:attributeGroup ref="global.attrs"/>
14           <xs:attributeGroup ref="global.xml"/>
15           <xs:attributeGroup ref="extension"/>
16           <xs:attribute name="id" type="xs:anyURI"/>
17           <xs:attribute name="defaultlocale"/>
18           <xs:attribute name="version"/>
19           <xs:attribute name="min-version" type="data.versionNumber"/>
20           <xs:attribute name="height" type="data.positiveNumber"/>
21           <xs:attribute name="width" type="data.positiveNumber"/>
22           <xs:attribute name="viewmodes">
23             <xs:simpleType>
24               <xs:list>
25                 <xs:simpleType>
26                   <xs:restriction base="xs:token">
27                     <xs:enumeration value="windowed"/>
28                     <xs:enumeration value="floating"/>
29                     <xs:enumeration value="fullscreen"/>
30                     <xs:enumeration value="maximized"/>
31                     <xs:enumeration value="minimized"/>
32                   </xs:restriction>
33                 </xs:simpleType>
34               </xs:list>
35             </xs:simpleType>
36           </xs:attribute>
37         </xs:extension>
38       </xs:complexContent>
39     </xs:complexType>
40   </xs:element>
41   <xs:complexType name="group.widgetContent" mixed="true">
42     <xs:choice minOccurs="0" maxOccurs="unbounded">
43       <xs:choice>
44         <xs:element ref="widgets:name"/>
45         <xs:element ref="widgets:description"/>
46         <xs:element ref="widgets:icon"/>
47         <xs:element ref="widgets:author"/>
48         <xs:element ref="widgets:license"/>
49         <xs:element ref="widgets:content"/>
50         <xs:element ref="widgets:feature"/>
51         <xs:element ref="widgets:preference"/>
52
53         <xs:element ref="tizen:app-control"  maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
54         <xs:element ref="tizen:setting"  maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
55         <xs:element ref="tizen:application" minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
56         <xs:element ref="tizen:content"  minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
57         <xs:element ref="tizen:privilege"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
58         <xs:element ref="tizen:content-security-policy" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
59         <xs:element ref="tizen:content-security-policy-report-only" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
60         <xs:element ref="tizen:allow-navigation" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
61         <xs:element ref="tizen:app-widget"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
62         <xs:element ref="tizen:account"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
63         <xs:element ref="tizen:metadata"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
64         <xs:group ref="foreignElement"/>
65         <!-- W3C testcases fail - should accept any element -->
66       </xs:choice>
67       <xs:element ref="widgets:access"/>
68       <xs:element ref="widgets:update-description"/>
69     </xs:choice>
70   </xs:complexType>
71   <xs:element name="name">
72     <xs:complexType mixed="true">
73       <xs:choice minOccurs="0" maxOccurs="unbounded">
74         <xs:element ref="widgets:span"/>
75         <xs:group ref="foreignElement"/>
76       </xs:choice>
77       <xs:attributeGroup ref="global.attrs"/>
78       <xs:attributeGroup ref="global.xml"/>
79       <xs:attributeGroup ref="extension"/>
80       <xs:attribute name="short"/>
81     </xs:complexType>
82   </xs:element>
83   <xs:element name="description">
84     <xs:complexType mixed="true">
85       <xs:choice minOccurs="0" maxOccurs="unbounded">
86         <xs:element ref="widgets:span"/>
87         <xs:group ref="foreignElement"/>
88       </xs:choice>
89       <xs:attributeGroup ref="global.attrs"/>
90       <xs:attributeGroup ref="global.xml"/>
91       <xs:attributeGroup ref="extension"/>
92     </xs:complexType>
93   </xs:element>
94   <xs:element name="icon">
95     <xs:complexType>
96       <xs:attributeGroup ref="global.attrs"/>
97       <xs:attributeGroup ref="foreignAttribute"/>
98       <!-- w3c testcase - must ignore
99       <xs:attribute name="src" use="required" type="xs:anyURI"/>
100       -->
101       <xs:attribute name="src" type="xs:anyURI"/>
102       <xs:attribute name="height" type="data.positiveNumber"/>
103       <xs:attribute name="width" type="data.positiveNumber"/>
104     </xs:complexType>
105   </xs:element>
106   <xs:element name="author">
107     <xs:complexType mixed="true">
108       <xs:choice minOccurs="0" maxOccurs="unbounded">
109         <xs:element ref="widgets:span"/>
110         <xs:group ref="foreignElement"/>
111         <!-- W3C testcases fail - should accept any element -->
112       </xs:choice>
113       <xs:attributeGroup ref="global.attrs"/>
114       <xs:attributeGroup ref="global.xml"/>
115       <xs:attributeGroup ref="extension"/>
116       <xs:attribute name="href" type="xs:anyURI"/>
117       <xs:attribute name="email" type="xs:string"/>
118       <!-- fails W3C testcases
119       <xs:attribute name="email">
120         <xs:simpleType>
121           <xs:restriction base="xs:string">
122             <xs:pattern value=".+@.+"/>
123           </xs:restriction>
124         </xs:simpleType>
125       </xs:attribute>
126        -->
127     </xs:complexType>
128   </xs:element>
129   <xs:element name="license">
130     <xs:complexType mixed="true">
131       <xs:choice minOccurs="0" maxOccurs="unbounded">
132         <xs:element ref="widgets:span"/>
133         <xs:group ref="foreignElement"/>
134       </xs:choice>
135       <xs:attributeGroup ref="global.attrs"/>
136       <xs:attributeGroup ref="global.xml"/>
137       <xs:attributeGroup ref="extension"/>
138       <xs:attribute name="href" type="xs:anyURI"/>
139     </xs:complexType>
140   </xs:element>
141   <xs:element name="content">
142     <xs:complexType>
143       <xs:attributeGroup ref="global.attrs"/>
144       <xs:attributeGroup ref="foreignAttribute"/>
145       <!-- w3c testcase - ignore not valid
146       <xs:attribute name="src" use="required" type="xs:anyURI"/>
147       -->
148       <xs:attribute name="src" type="xs:string"/>
149       <xs:attribute name="type"/>
150       <xs:attribute name="encoding"/>
151     </xs:complexType>
152   </xs:element>
153   <xs:element name="feature">
154     <xs:complexType mixed="true">
155       <xs:choice minOccurs="0" maxOccurs="unbounded">
156         <xs:element ref="widgets:param"/>
157         <xs:group ref="foreignElement"/>
158       </xs:choice>
159       <xs:attributeGroup ref="global.attrs"/>
160       <xs:attributeGroup ref="global.xml"/>
161       <xs:attributeGroup ref="extension"/>
162       <!-- w3c tescase - must ignore
163       <xs:attribute name="name" use="required" type="xs:anyURI"/>
164       -->
165       <xs:attribute name="name" type="xs:anyURI"/>
166       <xs:attribute name="required" type="data.boolean"/>
167     </xs:complexType>
168   </xs:element>
169   <xs:element name="param">
170     <xs:complexType mixed="true">
171       <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreignElement"/>
172       <xs:attributeGroup ref="global.attrs"/>
173       <xs:attributeGroup ref="global.xml"/>
174       <xs:attributeGroup ref="extension"/>
175       <xs:attribute name="name"/>
176       <xs:attribute name="value"/>
177       <!-- w3c testcase - must ignore
178       <xs:attribute name="name" use="required"/>
179       <xs:attribute name="value" use="required"/>
180       -->
181     </xs:complexType>
182   </xs:element>
183   <xs:element name="span">
184     <xs:complexType mixed="true">
185       <xs:choice minOccurs="0" maxOccurs="unbounded">
186         <xs:element ref="widgets:span"/>
187         <xs:group ref="foreignElement"/>
188       </xs:choice>
189       <xs:attributeGroup ref="global.attrs"/>
190       <xs:attributeGroup ref="global.xml"/>
191     </xs:complexType>
192   </xs:element>
193   <xs:element name="preference">
194     <xs:complexType mixed="true">
195       <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreignElement"/>
196       <xs:attributeGroup ref="global.attrs"/>
197       <xs:attributeGroup ref="global.xml"/>
198       <xs:attributeGroup ref="extension"/>
199       <!-- w3c testcase -required but missing
200       <xs:attribute name="name" use="required"/>
201       -->
202       <xs:attribute name="name"/>
203       <xs:attribute name="value"/>
204       <xs:attribute name="readonly" type="data.boolean"/>
205     </xs:complexType>
206   </xs:element>
207 </xs:schema>