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"/>
8 Widget Packaging and Configuration <http://www.w3.org/TR/widgets/>
11 <xs:element name="widget">
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">
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"/>
43 <xs:complexType name="group.widgetContent" mixed="true">
44 <xs:choice minOccurs="0" maxOccurs="unbounded">
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"/>
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"/> -->
70 <xs:element ref="widgets:access"/>
71 <!-- <xs:element ref="widgets:update-description"/> -->
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"/>
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"/>
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"/>
92 <xs:attributeGroup ref="widgets:global.attrs"/>
93 <xs:attributeGroup ref="widgets:global.xml"/>
94 <xs:attributeGroup ref="widgets:extension"/>
97 <xs:element name="icon">
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"/>
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"/>
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 -->
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">
124 <xs:restriction base="xs:string">
125 <xs:pattern value=".+@.+"/>
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"/>
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"/>
144 <xs:element name="content">
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"/>
151 <xs:attribute name="src" type="xs:string"/>
152 <xs:attribute name="type"/>
153 <xs:attribute name="encoding"/>
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"/>
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"/>
168 <xs:attribute name="name" type="xs:anyURI"/>
169 <xs:attribute name="required" type="widgets:data.boolean"/>
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"/>
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"/>
192 <xs:attributeGroup ref="widgets:global.attrs"/>
193 <xs:attributeGroup ref="widgets:global.xml"/>
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"/>
205 <xs:attribute name="name"/>
206 <xs:attribute name="value"/>
207 <xs:attribute name="readonly" type="widgets:data.boolean"/>