-
Notifications
You must be signed in to change notification settings - Fork 396
/
applications.rnc
256 lines (218 loc) · 5.31 KB
/
applications.rnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# #####################################################################
## RELAX NG Schema for HTML 5: Web Application Features #
# #####################################################################
## Additions to Common Attributes
common.attrs.interact &=
( common.attrs.contenteditable?
& common.attrs.draggable?
& common.attrs.hidden?
)
common.attrs.other &= common.attrs.interact
## Editable Content: contenteditable
common.attrs.contenteditable =
attribute contenteditable {
"true" | "plaintext-only" | "false" | ""
}
## Draggable Element: draggable
common.attrs.draggable =
attribute draggable {
"true" | "false"
}
## Hidden Element: hidden
common.attrs.hidden =
attribute hidden {
"hidden" | "until-found" | ""
}
## Global attributes applicable on elements with editable content
common.attrs.editing &=
( common.attrs.inputmode?
& common.attrs.spellcheck?
& common.attrs.autocapitalize?
& common.attrs.enterkeyhint?
)
common.attrs.other &= common.attrs.editing
## Hint expected data type: inputmode
common.attrs.inputmode =
attribute inputmode {
( "none"
| "text"
| "tel"
| "url"
| "email"
| "numeric"
| "decimal"
| "search"
)
}
## Spellchecking and grammar checking: spellcheck
common.attrs.spellcheck =
attribute spellcheck {
"true" | "false" | ""
}
## Autocapitalization
common.attrs.autocapitalize =
attribute autocapitalize {
( "off"
| "none"
| "on"
| "sentences"
| "words"
| "characters"
)
}
## Type of Enter button on virtual keyboards: enterkeyhint
common.attrs.enterkeyhint =
attribute enterkeyhint {
( "enter"
| "done"
| "go"
| "next"
| "previous"
| "search"
| "send"
)
}
## Progess Indicator: <progress>
progress.elem =
element progress { progress.inner & progress.attrs }
progress.attrs =
( common.attrs
& progress.attrs.value?
& progress.attrs.max?
& ( common.attrs.aria.implicit.progressbar
| common.attrs.aria.role.progressbar
)?
)
progress.attrs.value =
attribute value {
common.data.float.non-negative
}
progress.attrs.max =
attribute max {
common.data.float.positive
}
progress.inner =
( common.inner.phrasing ) #Cannot enforce textContent format here
common.elem.phrasing |= progress.elem
## Dialog box, inspector, or window: <dialog>
dialog.elem =
element dialog { dialog.inner & dialog.attrs }
dialog.attrs =
( common.attrs
& dialog.attrs.open?
& ( common.attrs.aria.implicit.dialog
| common.attrs.aria.role.alertdialog
)?
)
dialog.attrs.open =
attribute open {
"open" | ""
}
dialog.inner =
( common.inner.flow )
common.elem.flow |= dialog.elem
## Toolbar: <menu>
menu.elem =
element menu { menu.inner & menu.attrs }
menu.attrs =
( common.attrs
& ( common.attrs.aria.implicit.list
| common.attrs.aria.role.directory
| common.attrs.aria.role.group
| common.attrs.aria.role.list
| common.attrs.aria.role.listbox
| common.attrs.aria.role.menu
| common.attrs.aria.role.menubar
| common.attrs.aria.role.radiogroup
| common.attrs.aria.role.tablist
| common.attrs.aria.role.toolbar
| common.attrs.aria.role.tree
| common.attrs.aria.role.presentation
)?
)
menu.inner =
( mli.elem*
& common.elem.script-supporting*
)
common.elem.flow |= menu.elem
## Toolbar item: <li>
mli.elem =
element li { mli.inner & mli.attrs }
mli.attrs =
( common.attrs
& ( ( common.attrs.aria.role.listitem
| common.attrs.aria.role.menuitem
| common.attrs.aria.role.menuitemcheckbox
| common.attrs.aria.role.menuitemradio
| common.attrs.aria.role.option
| common.attrs.aria.role.tab
| common.attrs.aria.role.treeitem
| common.attrs.aria.role.presentation
)
)?
)
mli.inner =
( common.inner.flow )
## Canvas for Dynamic Graphics: <canvas>
canvas.elem.flow =
element canvas { canvas.inner.flow & canvas.attrs }
canvas.elem.phrasing =
element canvas { canvas.inner.phrasing & canvas.attrs }
canvas.attrs =
( common.attrs
& canvas.attrs.height?
& canvas.attrs.width?
& common.attrs.aria?
)
canvas.attrs.height =
attribute height {
common.data.integer.non-negative
}
canvas.attrs.width =
attribute width {
common.data.integer.non-negative
}
canvas.inner.flow =
( common.inner.transparent.flow )
canvas.inner.phrasing =
( common.inner.phrasing )
common.elem.flow |= canvas.elem.flow
common.elem.phrasing |= canvas.elem.phrasing
## Additional On-Demand Information: <details>
details.elem =
element details { details.inner & details.attrs }
details.attrs =
( common.attrs
& details.attrs.open?
& ( common.attrs.aria.implicit.group # aria-expanded must be true if open attr present; check by assertions
| common.attrs.aria.role.group
)?
)
details.attrs.open =
attribute open {
"open" | ""
}
details.inner =
( summary.elem
, common.inner.flow
)
common.elem.flow |= details.elem
## Caption/summary for details element: <summary>
summary.elem =
element summary { summary.inner & summary.attrs }
summary.attrs =
( common.attrs
& ( common.attrs.aria.implicit.button
| common.attrs.aria.role.button
)?
)
summary.inner =
( common.inner.phrasing
& h1.elem?
& h2.elem?
& h3.elem?
& h4.elem?
& h5.elem?
& h6.elem?
& hgroup.elem?
)