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 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
9 Widget Packaging and Configuration <http://www.w3.org/TR/widgets/>
12 <xs:element name="widget">
15 <xs:extension base="widgets:group.widgetContent">
16 <xs:attributeGroup ref="widgets:global.attrs"/>
17 <xs:attributeGroup ref="widgets:global.xml"/>
18 <xs:attributeGroup ref="widgets:extension"/>
19 <xs:attribute name="id" type="xs:anyURI"/>
20 <xs:attribute name="defaultlocale"/>
21 <xs:attribute name="version" type="widgets:data.versionNumber"/>
22 <xs:attribute name="min-version" type="widgets:data.versionNumber"/>
23 <xs:attribute name="height" type="widgets:data.positiveNumber"/>
24 <xs:attribute name="width" type="widgets:data.positiveNumber"/>
25 <xs:attribute name="viewmodes">
29 <xs:restriction base="xs:token">
30 <xs:enumeration value="windowed"/>
31 <xs:enumeration value="floating"/>
32 <xs:enumeration value="fullscreen"/>
33 <xs:enumeration value="maximized"/>
34 <xs:enumeration value="minimized"/>
40 <!-- Requirment from IDE UX -->
41 <xs:attribute ref="xml:lang"/>
46 <xs:complexType name="group.widgetContent" mixed="true">
47 <xs:choice minOccurs="0" maxOccurs="unbounded">
49 <xs:element ref="widgets:name"/>
50 <xs:element ref="widgets:description"/>
51 <xs:element ref="widgets:icon"/>
52 <xs:element ref="widgets:author"/>
53 <xs:element ref="widgets:license"/>
54 <xs:element ref="widgets:content"/>
55 <xs:element ref="widgets:feature"/>
56 <xs:element ref="widgets:preference"/>
58 <xs:element ref="tizen:app-control" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
59 <xs:element ref="tizen:setting" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
60 <xs:element ref="tizen:application" minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
61 <xs:element ref="tizen:content" minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
62 <xs:element ref="tizen:privilege" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
63 <xs:element ref="tizen:content-security-policy" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
64 <xs:element ref="tizen:content-security-policy-report-only" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
65 <xs:element ref="tizen:allow-navigation" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
66 <xs:element ref="tizen:app-widget" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
67 <xs:element ref="tizen:account" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
68 <xs:element ref="tizen:metadata" minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>
69 <xs:element ref="tizen:splash" minOccurs="0" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>
70 <!-- W3C testcases fail - should accept any element -->
71 <!-- <xs:group minOccurs="0" maxOccurs="unbounded" ref="widgets:foreignElement"/> -->
73 <xs:element ref="widgets:access"/>
74 <!-- <xs:element ref="widgets:update-description"/> -->
77 <xs:element name="name">
78 <xs:complexType mixed="true">
79 <xs:choice minOccurs="0" maxOccurs="unbounded">
80 <xs:element ref="widgets:span"/>
81 <xs:group ref="widgets:foreignElement"/>
83 <!-- Requirment from IDE UX -->
84 <xs:attribute ref="xml:lang"/>
85 <xs:attributeGroup ref="widgets:global.attrs"/>
86 <xs:attributeGroup ref="widgets:global.xml"/>
87 <xs:attributeGroup ref="widgets:extension"/>
88 <xs:attribute name="short"/>
91 <xs:element name="description">
92 <xs:complexType mixed="true">
93 <xs:choice minOccurs="0" maxOccurs="unbounded">
94 <xs:element ref="widgets:span"/>
95 <xs:group ref="widgets:foreignElement"/>
97 <!-- Requirment from IDE UX -->
98 <xs:attribute ref="xml:lang"/>
99 <xs:attributeGroup ref="widgets:global.attrs"/>
100 <xs:attributeGroup ref="widgets:global.xml"/>
101 <xs:attributeGroup ref="widgets:extension"/>
104 <xs:element name="icon">
106 <xs:attributeGroup ref="widgets:global.attrs"/>
107 <xs:attributeGroup ref="widgets:foreignAttribute"/>
108 <!-- w3c testcase - must ignore
109 <xs:attribute name="src" use="required" type="xs:anyURI"/>
111 <xs:attribute name="src" type="xs:anyURI"/>
112 <xs:attribute name="height" type="widgets:data.positiveNumber"/>
113 <xs:attribute name="width" type="widgets:data.positiveNumber"/>
116 <xs:element name="author">
117 <xs:complexType mixed="true">
118 <xs:choice minOccurs="0" maxOccurs="unbounded">
119 <xs:element ref="widgets:span"/>
120 <xs:group ref="widgets:foreignElement"/>
121 <!-- W3C testcases fail - should accept any element -->
123 <xs:attributeGroup ref="widgets:global.attrs"/>
124 <xs:attributeGroup ref="widgets:global.xml"/>
125 <xs:attributeGroup ref="widgets:extension"/>
126 <xs:attribute name="href" type="xs:anyURI"/>
127 <xs:attribute name="email" type="xs:string"/>
128 <!-- fails W3C testcases
129 <xs:attribute name="email">
131 <xs:restriction base="xs:string">
132 <xs:pattern value=".+@.+"/>
139 <xs:element name="license">
140 <xs:complexType mixed="true">
141 <xs:choice minOccurs="0" maxOccurs="unbounded">
142 <xs:element ref="widgets:span"/>
143 <xs:group ref="widgets:foreignElement"/>
145 <!-- Requirment from IDE UX -->
146 <xs:attribute ref="xml:lang"/>
147 <xs:attributeGroup ref="widgets:global.attrs"/>
148 <xs:attributeGroup ref="widgets:global.xml"/>
149 <xs:attributeGroup ref="widgets:extension"/>
150 <xs:attribute name="href" type="xs:anyURI"/>
153 <xs:element name="content">
155 <xs:attributeGroup ref="widgets:global.attrs"/>
156 <xs:attributeGroup ref="widgets:foreignAttribute"/>
157 <!-- w3c testcase - ignore not valid
158 <xs:attribute name="src" use="required" type="xs:anyURI"/>
160 <xs:attribute name="src" type="xs:string"/>
161 <xs:attribute name="type"/>
162 <xs:attribute name="encoding"/>
165 <xs:element name="feature">
166 <xs:complexType mixed="true">
167 <xs:choice minOccurs="0" maxOccurs="unbounded">
168 <xs:element ref="widgets:param"/>
169 <xs:group ref="widgets:foreignElement"/>
171 <xs:attributeGroup ref="widgets:global.attrs"/>
172 <xs:attributeGroup ref="widgets:global.xml"/>
173 <xs:attributeGroup ref="widgets:extension"/>
174 <!-- w3c tescase - must ignore
175 <xs:attribute name="name" use="required" type="xs:anyURI"/>
177 <xs:attribute name="name" type="xs:anyURI"/>
178 <xs:attribute name="required" type="widgets:data.boolean"/>
181 <xs:element name="param">
182 <xs:complexType mixed="true">
183 <xs:group minOccurs="0" maxOccurs="unbounded" ref="widgets:foreignElement"/>
184 <xs:attributeGroup ref="widgets:global.attrs"/>
185 <xs:attributeGroup ref="widgets:global.xml"/>
186 <xs:attributeGroup ref="widgets:extension"/>
187 <xs:attribute name="name"/>
188 <xs:attribute name="value"/>
189 <!-- w3c testcase - must ignore
190 <xs:attribute name="name" use="required"/>
191 <xs:attribute name="value" use="required"/>
195 <xs:element name="span">
196 <xs:complexType mixed="true">
197 <xs:choice minOccurs="0" maxOccurs="unbounded">
198 <xs:element ref="widgets:span"/>
199 <xs:group ref="widgets:foreignElement"/>
201 <xs:attributeGroup ref="widgets:global.attrs"/>
202 <xs:attributeGroup ref="widgets:global.xml"/>
205 <xs:element name="preference">
206 <xs:complexType mixed="true">
207 <xs:group minOccurs="0" maxOccurs="unbounded" ref="widgets:foreignElement"/>
208 <xs:attributeGroup ref="widgets:global.attrs"/>
209 <xs:attributeGroup ref="widgets:global.xml"/>
210 <xs:attributeGroup ref="widgets:extension"/>
211 <!-- w3c testcase -required but missing
212 <xs:attribute name="name" use="required"/>
214 <xs:attribute name="name"/>
215 <xs:attribute name="value"/>
216 <xs:attribute name="readonly" type="widgets:data.boolean"/>