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