patrick@73
|
1 |
# $Id$
|
patrick@73
|
2 |
|
patrick@73
|
3 |
|
patrick@73
|
4 |
include "publidoc.rnc" {
|
patrick@73
|
5 |
start = publiquiz
|
patrick@73
|
6 |
|
patrick@73
|
7 |
document.content =
|
patrick@73
|
8 |
top.head?,
|
patrick@73
|
9 |
(division | topic | quiz)+
|
patrick@84
|
10 |
|
patrick@84
|
11 |
division.content =
|
patrick@84
|
12 |
division.head?,
|
patrick@84
|
13 |
(division | topic | quiz)+
|
patrick@73
|
14 |
}
|
patrick@73
|
15 |
|
patrick@75
|
16 |
|
patrick@73
|
17 |
publiquiz = element publiquiz {
|
patrick@73
|
18 |
publiquiz.attributes,
|
patrick@73
|
19 |
publiquiz.content
|
patrick@73
|
20 |
}
|
patrick@73
|
21 |
|
patrick@73
|
22 |
publiquiz.attributes =
|
patrick@73
|
23 |
version.attribute
|
patrick@73
|
24 |
|
patrick@73
|
25 |
publiquiz.content =
|
patrick@73
|
26 |
document
|
patrick@73
|
27 |
| top.quiz
|
patrick@73
|
28 |
|
patrick@73
|
29 |
|
patrick@73
|
30 |
# =============================================================================
|
patrick@73
|
31 |
# TOP LEVEL
|
patrick@73
|
32 |
# =============================================================================
|
patrick@73
|
33 |
|
Patrick@310
|
34 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
35 |
|
patrick@128
|
36 |
top.quiz = element quiz { top.quiz.attributes, top.quiz.content }
|
patrick@73
|
37 |
|
patrick@73
|
38 |
top.quiz.attributes =
|
patrick@73
|
39 |
quiz.id.attribute
|
Patrick@158
|
40 |
& quiz.type.attribute?
|
patrick@73
|
41 |
& lang.attribute?
|
patrick@117
|
42 |
quiz.id.attribute = attribute id { xsd:NMTOKEN }
|
Patrick@158
|
43 |
quiz.type.attribute = attribute type { xsd:NCName }
|
patrick@73
|
44 |
|
patrick@128
|
45 |
top.quiz.content =
|
patrick@128
|
46 |
top.head?,
|
patrick@128
|
47 |
instructions,
|
patrick@128
|
48 |
(engine | composite),
|
patrick@128
|
49 |
help?,
|
patrick@128
|
50 |
answer?
|
patrick@73
|
51 |
|
Patrick@310
|
52 |
|
patrick@73
|
53 |
# =============================================================================
|
Patrick@310
|
54 |
# COMPONENT LEVEL
|
patrick@73
|
55 |
# =============================================================================
|
patrick@73
|
56 |
|
patrick@73
|
57 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
58 |
|
patrick@73
|
59 |
quiz = element quiz { quiz.attributes, quiz.content }
|
patrick@73
|
60 |
|
patrick@73
|
61 |
quiz.attributes =
|
Patrick@310
|
62 |
(quiz.id.attribute | xmlid.attribute)?
|
Patrick@158
|
63 |
& quiz.type.attribute?
|
patrick@73
|
64 |
& lang.attribute?
|
patrick@73
|
65 |
|
patrick@73
|
66 |
quiz.content =
|
patrick@73
|
67 |
component.head?,
|
patrick@73
|
68 |
instructions,
|
patrick@87
|
69 |
(engine | composite),
|
patrick@73
|
70 |
help?,
|
patrick@87
|
71 |
answer?
|
patrick@73
|
72 |
|
patrick@73
|
73 |
|
patrick@73
|
74 |
# =============================================================================
|
patrick@73
|
75 |
# SECTION LEVEL
|
patrick@73
|
76 |
# =============================================================================
|
patrick@73
|
77 |
|
patrick@73
|
78 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
79 |
|
patrick@73
|
80 |
blanks.section = element section { section.attributes, blanks.section.content }
|
patrick@73
|
81 |
point.section = element section { section.attributes, point.section.content }
|
patrick@73
|
82 |
|
patrick@73
|
83 |
blanks.section.content =
|
patrick@73
|
84 |
section.head?,
|
patrick@73
|
85 |
(blanks.section+ | blanks.block+)
|
patrick@73
|
86 |
point.section.content =
|
patrick@73
|
87 |
section.head?,
|
patrick@73
|
88 |
(point.section+ | point.block+)
|
patrick@73
|
89 |
|
patrick@73
|
90 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
91 |
|
patrick@73
|
92 |
instructions = element instructions { section.content }
|
patrick@73
|
93 |
|
patrick@73
|
94 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
95 |
|
patrick@73
|
96 |
engine =
|
patrick@87
|
97 |
choices-radio
|
patrick@87
|
98 |
| choices-check
|
patrick@87
|
99 |
| blanks-fill
|
patrick@87
|
100 |
| blanks-select
|
Patrick@216
|
101 |
| blanks-char
|
patrick@73
|
102 |
| point
|
patrick@73
|
103 |
| matching
|
patrick@73
|
104 |
| sort
|
patrick@125
|
105 |
| categories
|
patrick@194
|
106 |
| pip
|
patrick@87
|
107 |
| production
|
patrick@73
|
108 |
|
patrick@73
|
109 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
110 |
|
patrick@87
|
111 |
choices-radio = element choices-radio {
|
patrick@87
|
112 |
choices.attributes, choices-radio.content }
|
patrick@87
|
113 |
choices-check = element choices-check {
|
patrick@87
|
114 |
choices.attributes, choices-check.content }
|
patrick@73
|
115 |
|
patrick@73
|
116 |
choices.attributes =
|
patrick@73
|
117 |
shuffle.attribute?
|
patrick@73
|
118 |
shuffle.attribute = attribute shuffle { xsd:boolean }
|
patrick@73
|
119 |
|
patrick@87
|
120 |
choices-radio.content =
|
patrick@73
|
121 |
choices.right
|
patrick@73
|
122 |
& choices.wrong+
|
patrick@87
|
123 |
choices-check.content =
|
patrick@73
|
124 |
(choices.right | choices.wrong)+
|
patrick@73
|
125 |
|
patrick@73
|
126 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
127 |
|
patrick@87
|
128 |
blanks-fill = element blanks-fill {
|
patrick@87
|
129 |
blanks-fill.attributes, blanks-fill.content }
|
patrick@87
|
130 |
blanks-select = element blanks-select {
|
patrick@87
|
131 |
blanks-select.attributes, blanks-select.content }
|
Patrick@216
|
132 |
blanks-char = element blanks-char { blanks-select.content }
|
patrick@73
|
133 |
|
patrick@87
|
134 |
blanks-fill.attributes =
|
patrick@75
|
135 |
strict.attribute?
|
patrick@87
|
136 |
blanks-select.attributes =
|
patrick@73
|
137 |
multiple.attribute?
|
patrick@73
|
138 |
strict.attribute = attribute strict { xsd:boolean }
|
patrick@73
|
139 |
multiple.attribute = attribute multiple { xsd:boolean }
|
patrick@73
|
140 |
|
patrick@87
|
141 |
blanks-fill.content =
|
patrick@73
|
142 |
(blanks.block+ | blanks.section+)
|
patrick@87
|
143 |
blanks-select.content =
|
patrick@73
|
144 |
blanks.wrongs?,
|
patrick@73
|
145 |
(blanks.block+ | blanks.section+)
|
patrick@73
|
146 |
|
patrick@73
|
147 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
148 |
|
patrick@73
|
149 |
point = element point { point.attributes, point.content }
|
patrick@75
|
150 |
|
patrick@73
|
151 |
point.attributes =
|
patrick@73
|
152 |
point.type.attribute?
|
patrick@73
|
153 |
point.type.attribute = attribute type {
|
patrick@73
|
154 |
"radio" | "radio_button" | "check" | "check_button" }
|
patrick@73
|
155 |
|
patrick@73
|
156 |
point.content =
|
patrick@73
|
157 |
(point.section+ | point.block+)
|
patrick@73
|
158 |
|
patrick@73
|
159 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
160 |
|
Patrick@161
|
161 |
# ~~~~~~ matching
|
Patrick@169
|
162 |
matching = element matching { matching.attributes, matching.content }
|
Patrick@169
|
163 |
|
Patrick@169
|
164 |
matching.attributes =
|
Patrick@169
|
165 |
multiple.attribute?
|
patrick@75
|
166 |
|
patrick@73
|
167 |
matching.content =
|
patrick@73
|
168 |
match,
|
patrick@73
|
169 |
match+
|
patrick@73
|
170 |
|
Patrick@161
|
171 |
# ~~~~~~ match
|
Patrick@161
|
172 |
match = element match { match.content }
|
Patrick@161
|
173 |
|
Patrick@161
|
174 |
match.content =
|
Patrick@161
|
175 |
match.item,
|
Patrick@161
|
176 |
match.item
|
Patrick@161
|
177 |
|
patrick@73
|
178 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
179 |
|
patrick@73
|
180 |
sort = element sort { sort.attributes, sort.content }
|
patrick@73
|
181 |
|
patrick@73
|
182 |
sort.attributes =
|
patrick@73
|
183 |
shuffle.attribute?
|
patrick@75
|
184 |
|
patrick@73
|
185 |
sort.content =
|
patrick@73
|
186 |
comparison?,
|
patrick@73
|
187 |
sort.item,
|
patrick@73
|
188 |
sort.item+
|
patrick@73
|
189 |
|
patrick@125
|
190 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
191 |
|
Patrick@310
|
192 |
# ~~~~~~ category.head
|
Patrick@310
|
193 |
category.head = element head { category.head.content }
|
Patrick@310
|
194 |
|
Patrick@310
|
195 |
category.head.content =
|
Patrick@310
|
196 |
title,
|
Patrick@310
|
197 |
shorttitle?,
|
Patrick@310
|
198 |
subtitle*
|
Patrick@310
|
199 |
|
patrick@125
|
200 |
# ~~~~~~ categories
|
Patrick@168
|
201 |
categories = element categories { categories.attributes, categories.content }
|
patrick@125
|
202 |
|
Patrick@168
|
203 |
categories.attributes =
|
Patrick@168
|
204 |
multiple.attribute?
|
Patrick@310
|
205 |
|
patrick@125
|
206 |
categories.content =
|
Patrick@174
|
207 |
category.item*,
|
patrick@125
|
208 |
category,
|
patrick@125
|
209 |
category+
|
patrick@125
|
210 |
|
patrick@125
|
211 |
# ~~~~~~ category
|
patrick@125
|
212 |
category = element category { category.content }
|
patrick@125
|
213 |
|
patrick@125
|
214 |
category.content =
|
patrick@125
|
215 |
category.head,
|
patrick@125
|
216 |
category.item*
|
patrick@125
|
217 |
|
patrick@194
|
218 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@194
|
219 |
|
patrick@194
|
220 |
pip = element pip { pip.attributes, pip.content }
|
patrick@194
|
221 |
|
patrick@194
|
222 |
pip.attributes =
|
patrick@194
|
223 |
multiple.attribute?
|
patrick@194
|
224 |
|
patrick@194
|
225 |
pip.content =
|
patrick@194
|
226 |
pip.image
|
patrick@194
|
227 |
|
patrick@87
|
228 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@87
|
229 |
|
patrick@87
|
230 |
production = element production { empty }
|
patrick@87
|
231 |
|
patrick@73
|
232 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
233 |
|
patrick@77
|
234 |
# ~~~~~~ composite
|
Patrick@161
|
235 |
composite = element composite { composite.attributes, composite.content }
|
Patrick@161
|
236 |
|
Patrick@161
|
237 |
composite.attributes =
|
Patrick@161
|
238 |
multipage.attribute?
|
Patrick@310
|
239 |
multipage.attribute = attribute multipage { xsd:boolean }
|
patrick@75
|
240 |
|
patrick@73
|
241 |
composite.content =
|
patrick@85
|
242 |
subquiz,
|
Patrick@154
|
243 |
subquiz+
|
patrick@77
|
244 |
|
patrick@85
|
245 |
# ~~~~~~ subquiz
|
patrick@85
|
246 |
subquiz = element subquiz { subquiz.content }
|
patrick@77
|
247 |
|
patrick@85
|
248 |
subquiz.content =
|
patrick@77
|
249 |
instructions?,
|
Patrick@141
|
250 |
engine,
|
Patrick@141
|
251 |
help?,
|
Patrick@141
|
252 |
answer?
|
patrick@73
|
253 |
|
patrick@73
|
254 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
255 |
|
patrick@73
|
256 |
help = element help { help.content }
|
patrick@73
|
257 |
|
patrick@73
|
258 |
help.content =
|
patrick@73
|
259 |
(section+ | block+)?,
|
patrick@73
|
260 |
link*
|
patrick@73
|
261 |
|
patrick@87
|
262 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
263 |
|
patrick@87
|
264 |
answer = element answer { answer.content }
|
patrick@73
|
265 |
|
patrick@87
|
266 |
answer.content =
|
patrick@81
|
267 |
(section+ | block+)?,
|
patrick@80
|
268 |
link*
|
patrick@73
|
269 |
|
patrick@73
|
270 |
|
patrick@73
|
271 |
# =============================================================================
|
patrick@73
|
272 |
# BLOCK LEVEL
|
patrick@73
|
273 |
# =============================================================================
|
patrick@73
|
274 |
|
patrick@73
|
275 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
276 |
|
patrick@73
|
277 |
blanks.block =
|
Patrick@174
|
278 |
(blanks.p | speech | blanks.list | blockquote | blanks.table | blanks.media)
|
patrick@73
|
279 |
point.block =
|
patrick@73
|
280 |
(point.p | speech | point.list | blockquote | point.table | media)
|
patrick@73
|
281 |
|
patrick@73
|
282 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
283 |
|
patrick@73
|
284 |
blanks.p = element p { blanks.p.content }
|
patrick@73
|
285 |
point.p = element p { point.p.content }
|
patrick@73
|
286 |
|
patrick@73
|
287 |
blanks.p.content =
|
patrick@75
|
288 |
blanks.inlines
|
patrick@73
|
289 |
point.p.content =
|
patrick@75
|
290 |
point.inlines
|
patrick@73
|
291 |
|
patrick@73
|
292 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
293 |
|
patrick@73
|
294 |
# ~~~~~~ list
|
patrick@75
|
295 |
blanks.list = element list {
|
patrick@73
|
296 |
block.head?,
|
patrick@73
|
297 |
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
|
patrick@73
|
298 |
| (attribute type {"glossary"}, glossary.item+) )
|
patrick@75
|
299 |
}
|
patrick@75
|
300 |
point.list = element list {
|
patrick@73
|
301 |
block.head?,
|
patrick@73
|
302 |
( (attribute type {"ordered"}?, point.item, point.item+)
|
patrick@73
|
303 |
| (attribute type {"glossary"}, glossary.item+) )
|
patrick@75
|
304 |
}
|
patrick@73
|
305 |
|
patrick@73
|
306 |
# ~~~~~~ item
|
patrick@73
|
307 |
blanks.item = element item { blanks.item.content }
|
patrick@73
|
308 |
point.item = element item { point.item.content }
|
patrick@73
|
309 |
|
patrick@73
|
310 |
blanks.item.content =
|
patrick@75
|
311 |
blanks.inlines
|
patrick@73
|
312 |
| blanks.block+
|
patrick@73
|
313 |
point.item.content =
|
patrick@75
|
314 |
point.inlines
|
patrick@73
|
315 |
| point.block+
|
patrick@73
|
316 |
|
patrick@73
|
317 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
318 |
|
patrick@249
|
319 |
blanks.table = element table { table.attributes, blanks.table.content }
|
patrick@249
|
320 |
point.table = element table { table.attributes, point.table.content }
|
patrick@73
|
321 |
|
patrick@73
|
322 |
blanks.table.content =
|
patrick@73
|
323 |
block.head?,
|
patrick@249
|
324 |
thead?,
|
patrick@249
|
325 |
(blanks.tbody+ | blanks.tr+),
|
patrick@111
|
326 |
table.caption?
|
patrick@73
|
327 |
point.table.content =
|
patrick@73
|
328 |
block.head?,
|
patrick@249
|
329 |
(point.tbody+ | point.tr+),
|
patrick@111
|
330 |
table.caption?
|
patrick@73
|
331 |
|
patrick@73
|
332 |
# ~~~~~~ tbody
|
patrick@249
|
333 |
blanks.tbody = element tbody { blanks.tbody.content }
|
patrick@249
|
334 |
point.tbody = element tbody { point.tbody.content }
|
patrick@73
|
335 |
|
patrick@73
|
336 |
blanks.tbody.content =
|
patrick@249
|
337 |
blanks.tr+
|
patrick@73
|
338 |
point.tbody.content =
|
patrick@249
|
339 |
point.tr+
|
patrick@73
|
340 |
|
patrick@249
|
341 |
# ~~~~~~ tr
|
patrick@249
|
342 |
blanks.tr = element tr { tr.attributes, blanks.tr.content }
|
patrick@249
|
343 |
point.tr = element tr { tr.attributes, point.tr.content }
|
patrick@73
|
344 |
|
patrick@249
|
345 |
blanks.tr.content =
|
patrick@249
|
346 |
(blanks.td | blanks.th)+
|
patrick@249
|
347 |
point.tr.content =
|
patrick@249
|
348 |
(point.td | point.th)+
|
patrick@73
|
349 |
|
patrick@249
|
350 |
# ~~~~~~ td, th
|
patrick@249
|
351 |
blanks.td = element td { td.attributes, blanks.td.content }
|
patrick@249
|
352 |
blanks.th = element th { td.attributes, blanks.td.content }
|
patrick@249
|
353 |
point.td = element td { td.attributes, point.td.content }
|
patrick@249
|
354 |
point.th = element th { td.attributes, point.td.content }
|
patrick@73
|
355 |
|
patrick@249
|
356 |
blanks.td.content =
|
patrick@75
|
357 |
blanks.inlines
|
patrick@73
|
358 |
| (p | media)+
|
patrick@73
|
359 |
|
patrick@249
|
360 |
point.td.content =
|
patrick@75
|
361 |
point.inlines
|
patrick@73
|
362 |
| (p | media)+
|
patrick@73
|
363 |
|
Patrick@174
|
364 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@174
|
365 |
|
Patrick@174
|
366 |
# ~~~~~~ blanks.media
|
patrick@249
|
367 |
blanks.media = element media { media.attributes, blanksmedia.content }
|
Patrick@174
|
368 |
|
Patrick@174
|
369 |
blanksmedia.content =
|
Patrick@174
|
370 |
block.head?,
|
Patrick@174
|
371 |
(blanks.image | audio | video)+,
|
Patrick@174
|
372 |
media.caption?,
|
Patrick@174
|
373 |
link?
|
Patrick@174
|
374 |
|
Patrick@174
|
375 |
# ~~~~~~ blanks.image
|
Patrick@174
|
376 |
blanks.image = element image { image.attributes, blanks.image.content }
|
patrick@194
|
377 |
pip.image = element image { image.attributes, pip.image.content }
|
Patrick@174
|
378 |
|
Patrick@174
|
379 |
blanks.image.content =
|
Patrick@174
|
380 |
copyright?,
|
Patrick@192
|
381 |
blanks.dropzone*
|
patrick@194
|
382 |
pip.image.content =
|
patrick@194
|
383 |
pip.dropzone+
|
Patrick@174
|
384 |
|
patrick@194
|
385 |
# ~~~~~~dropzone
|
Patrick@192
|
386 |
blanks.dropzone = element dropzone {
|
Patrick@192
|
387 |
blanks.dropzone.attributes, blanks.dropzone.content }
|
patrick@194
|
388 |
pip.dropzone = element dropzone {
|
patrick@194
|
389 |
pip.dropzone.attributes, pip.dropzone.content }
|
Patrick@183
|
390 |
|
Patrick@192
|
391 |
blanks.dropzone.attributes =
|
Patrick@183
|
392 |
x.attribute
|
Patrick@310
|
393 |
& y.attribute
|
patrick@194
|
394 |
pip.dropzone.attributes =
|
patrick@194
|
395 |
x.attribute
|
patrick@194
|
396 |
& y.attribute
|
patrick@194
|
397 |
& w.attribute
|
patrick@194
|
398 |
& h.attribute
|
Patrick@174
|
399 |
|
Patrick@192
|
400 |
blanks.dropzone.content =
|
Patrick@183
|
401 |
blank
|
patrick@194
|
402 |
pip.dropzone.content =
|
patrick@194
|
403 |
image?
|
Patrick@174
|
404 |
|
patrick@73
|
405 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
406 |
|
patrick@73
|
407 |
choices.right = element right { choices.right.content }
|
patrick@73
|
408 |
choices.wrong = element wrong { choices.right.content }
|
patrick@73
|
409 |
|
patrick@73
|
410 |
choices.right.content =
|
patrick@73
|
411 |
inlines
|
Patrick@161
|
412 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@73
|
413 |
|
patrick@73
|
414 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
415 |
|
patrick@73
|
416 |
# ~~~~~~ blanks.wrongs
|
patrick@73
|
417 |
blanks.wrongs = element wrongs { blanks.wrongs.content }
|
patrick@73
|
418 |
|
patrick@73
|
419 |
blanks.wrongs.content =
|
patrick@73
|
420 |
blanks.wrong+
|
patrick@73
|
421 |
|
patrick@73
|
422 |
# ~~~~~~ blanks.wrong
|
patrick@73
|
423 |
blanks.wrong = element wrong { blanks.wrong.content }
|
patrick@73
|
424 |
|
patrick@73
|
425 |
blanks.wrong.content = text
|
patrick@73
|
426 |
|
Patrick@161
|
427 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
428 |
|
Patrick@161
|
429 |
match.item = element item { match.item.content }
|
patrick@73
|
430 |
|
Patrick@161
|
431 |
match.item.content =
|
Patrick@161
|
432 |
inlines
|
patrick@166
|
433 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@73
|
434 |
|
patrick@75
|
435 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
436 |
|
patrick@73
|
437 |
# ~~~~~~ comparison
|
patrick@73
|
438 |
comparison = element comparison { comparison.content }
|
patrick@73
|
439 |
|
patrick@73
|
440 |
comparison.content = inlines
|
patrick@73
|
441 |
|
patrick@73
|
442 |
# ~~~~~~ sort.item
|
patrick@73
|
443 |
sort.item = element item { sort.item.attributes, sort.item.content }
|
patrick@73
|
444 |
|
patrick@73
|
445 |
sort.item.attributes =
|
patrick@73
|
446 |
item.shuffle.attribute?
|
patrick@73
|
447 |
item.shuffle.attribute = attribute shuffle { xsd:integer }
|
patrick@73
|
448 |
|
Patrick@161
|
449 |
sort.item.content =
|
Patrick@161
|
450 |
inlines
|
patrick@166
|
451 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@73
|
452 |
|
patrick@125
|
453 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
454 |
|
patrick@125
|
455 |
category.item = element item { category.item.content }
|
patrick@125
|
456 |
|
Patrick@161
|
457 |
category.item.content =
|
Patrick@161
|
458 |
inlines
|
patrick@166
|
459 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@125
|
460 |
|
patrick@73
|
461 |
|
patrick@73
|
462 |
# =============================================================================
|
patrick@73
|
463 |
# INLINE LEVEL
|
patrick@73
|
464 |
# =============================================================================
|
patrick@73
|
465 |
|
patrick@75
|
466 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@75
|
467 |
|
Patrick@293
|
468 |
blanks.inlines = mixed {
|
Patrick@293
|
469 |
sup*
|
Patrick@293
|
470 |
& sub*
|
Patrick@293
|
471 |
& var*
|
Patrick@293
|
472 |
& number*
|
Patrick@293
|
473 |
& math*
|
Patrick@293
|
474 |
& date*
|
Patrick@293
|
475 |
& name*
|
Patrick@293
|
476 |
& acronym*
|
Patrick@293
|
477 |
& term*
|
Patrick@293
|
478 |
& warning*
|
Patrick@293
|
479 |
|
Patrick@291
|
480 |
& literal*
|
Patrick@291
|
481 |
& foreign*
|
Patrick@291
|
482 |
& highlight*
|
Patrick@291
|
483 |
& emphasis*
|
Patrick@291
|
484 |
& mentioned*
|
Patrick@291
|
485 |
& stage*
|
Patrick@291
|
486 |
& initial*
|
Patrick@291
|
487 |
& quote*
|
Patrick@291
|
488 |
& image*
|
Patrick@291
|
489 |
& audio*
|
Patrick@291
|
490 |
& smil*
|
Patrick@291
|
491 |
& note*
|
Patrick@291
|
492 |
& link*
|
Patrick@291
|
493 |
& anchor*
|
Patrick@291
|
494 |
& index*
|
Patrick@293
|
495 |
|
patrick@75
|
496 |
& blank*
|
Patrick@293
|
497 |
}
|
Patrick@288
|
498 |
|
Patrick@293
|
499 |
point.inlines = mixed {
|
Patrick@293
|
500 |
sup*
|
Patrick@293
|
501 |
& sub*
|
Patrick@293
|
502 |
& var*
|
Patrick@293
|
503 |
& number*
|
Patrick@293
|
504 |
& math*
|
Patrick@293
|
505 |
& date*
|
Patrick@293
|
506 |
& name*
|
Patrick@293
|
507 |
& acronym*
|
Patrick@293
|
508 |
& term*
|
Patrick@293
|
509 |
& warning*
|
Patrick@293
|
510 |
|
Patrick@291
|
511 |
& literal*
|
Patrick@291
|
512 |
& foreign*
|
Patrick@291
|
513 |
& highlight*
|
Patrick@291
|
514 |
& emphasis*
|
Patrick@291
|
515 |
& mentioned*
|
Patrick@291
|
516 |
& stage*
|
Patrick@291
|
517 |
& initial*
|
Patrick@291
|
518 |
& quote*
|
Patrick@291
|
519 |
& image*
|
Patrick@291
|
520 |
& audio*
|
Patrick@291
|
521 |
& smil*
|
Patrick@291
|
522 |
& note*
|
Patrick@291
|
523 |
& link*
|
Patrick@291
|
524 |
& anchor*
|
Patrick@291
|
525 |
& index*
|
Patrick@293
|
526 |
|
patrick@75
|
527 |
& blank*
|
patrick@75
|
528 |
& point.right*
|
patrick@75
|
529 |
& point.wrong*
|
Patrick@293
|
530 |
}
|
patrick@75
|
531 |
|
patrick@73
|
532 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
533 |
|
patrick@73
|
534 |
# ~~~~~~ blank
|
Patrick@216
|
535 |
blank = element blank { blank.attributes, blank.content }
|
Patrick@216
|
536 |
|
Patrick@216
|
537 |
blank.attributes =
|
Patrick@216
|
538 |
function.attribute?
|
Patrick@216
|
539 |
function.attribute = attribute function { 'lowercase' | 'uppercase' }
|
patrick@73
|
540 |
|
patrick@73
|
541 |
blank.content =
|
patrick@73
|
542 |
text
|
patrick@87
|
543 |
| (s+, help?, answer?)
|
patrick@73
|
544 |
|
patrick@73
|
545 |
# ~~~~~~ s
|
patrick@73
|
546 |
s = element s { s.content }
|
patrick@73
|
547 |
|
patrick@73
|
548 |
s.content = text
|
patrick@73
|
549 |
|
patrick@73
|
550 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~ point.right, point.wrong ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
551 |
|
patrick@73
|
552 |
point.right = element right { point.right.content }
|
patrick@73
|
553 |
point.wrong = element wrong { point.right.content }
|
patrick@73
|
554 |
|
patrick@73
|
555 |
point.right.content = inlines
|