patrick@73
|
1 |
|
patrick@73
|
2 |
include "publidoc.rnc" {
|
patrick@73
|
3 |
start = publiquiz
|
patrick@73
|
4 |
|
patrick@73
|
5 |
document.content =
|
patrick@73
|
6 |
top.head?,
|
patrick@73
|
7 |
(division | topic | quiz)+
|
patrick@84
|
8 |
|
patrick@84
|
9 |
division.content =
|
patrick@84
|
10 |
division.head?,
|
Patrick@353
|
11 |
front?,
|
patrick@84
|
12 |
(division | topic | quiz)+
|
Coraline@436
|
13 |
|
Coraline@436
|
14 |
nowrap.content =
|
Coraline@441
|
15 |
inlines | blanks.inlines | blanks-m.inlines | blanks-c.inlines
|
Coraline@441
|
16 |
| pointing.inlines
|
patrick@73
|
17 |
}
|
patrick@73
|
18 |
|
patrick@75
|
19 |
|
patrick@73
|
20 |
publiquiz = element publiquiz {
|
patrick@73
|
21 |
publiquiz.attributes,
|
patrick@73
|
22 |
publiquiz.content
|
patrick@73
|
23 |
}
|
patrick@73
|
24 |
|
patrick@73
|
25 |
publiquiz.attributes =
|
patrick@73
|
26 |
version.attribute
|
patrick@73
|
27 |
|
patrick@73
|
28 |
publiquiz.content =
|
patrick@73
|
29 |
document
|
patrick@73
|
30 |
| top.quiz
|
patrick@73
|
31 |
|
patrick@73
|
32 |
|
patrick@73
|
33 |
# =============================================================================
|
patrick@73
|
34 |
# TOP LEVEL
|
patrick@73
|
35 |
# =============================================================================
|
patrick@73
|
36 |
|
Patrick@310
|
37 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
38 |
|
patrick@128
|
39 |
top.quiz = element quiz { top.quiz.attributes, top.quiz.content }
|
patrick@73
|
40 |
|
patrick@73
|
41 |
top.quiz.attributes =
|
Patrick@388
|
42 |
quiz.id.attribute?
|
Patrick@158
|
43 |
& quiz.type.attribute?
|
patrick@73
|
44 |
& lang.attribute?
|
patrick@117
|
45 |
quiz.id.attribute = attribute id { xsd:NMTOKEN }
|
Patrick@158
|
46 |
quiz.type.attribute = attribute type { xsd:NCName }
|
patrick@73
|
47 |
|
patrick@128
|
48 |
top.quiz.content =
|
patrick@128
|
49 |
top.head?,
|
claire@345
|
50 |
instructions?,
|
patrick@128
|
51 |
(engine | composite),
|
patrick@128
|
52 |
help?,
|
patrick@128
|
53 |
answer?
|
patrick@73
|
54 |
|
Patrick@310
|
55 |
|
patrick@73
|
56 |
# =============================================================================
|
Patrick@310
|
57 |
# COMPONENT LEVEL
|
patrick@73
|
58 |
# =============================================================================
|
patrick@73
|
59 |
|
patrick@73
|
60 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
61 |
|
patrick@73
|
62 |
quiz = element quiz { quiz.attributes, quiz.content }
|
patrick@73
|
63 |
|
patrick@73
|
64 |
quiz.attributes =
|
Patrick@310
|
65 |
(quiz.id.attribute | xmlid.attribute)?
|
Patrick@158
|
66 |
& quiz.type.attribute?
|
patrick@73
|
67 |
& lang.attribute?
|
patrick@73
|
68 |
|
patrick@73
|
69 |
quiz.content =
|
patrick@73
|
70 |
component.head?,
|
Patrick@417
|
71 |
instructions?,
|
patrick@87
|
72 |
(engine | composite),
|
patrick@73
|
73 |
help?,
|
patrick@87
|
74 |
answer?
|
patrick@73
|
75 |
|
patrick@73
|
76 |
|
patrick@73
|
77 |
# =============================================================================
|
patrick@73
|
78 |
# SECTION LEVEL
|
patrick@73
|
79 |
# =============================================================================
|
patrick@73
|
80 |
|
patrick@73
|
81 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
82 |
|
patrick@73
|
83 |
blanks.section = element section { section.attributes, blanks.section.content }
|
Coraline@409
|
84 |
blanks-m.section = element section {
|
Coraline@409
|
85 |
section.attributes, blanks-m.section.content }
|
Coraline@441
|
86 |
blanks-c.section = element section {
|
Coraline@441
|
87 |
section.attributes, blanks-c.section.content }
|
Coraline@442
|
88 |
correct.section = element section {
|
Coraline@442
|
89 |
section.attributes, correct.section.content }
|
Patrick@336
|
90 |
pointing.section = element section {
|
Patrick@336
|
91 |
section.attributes, pointing.section.content }
|
patrick@73
|
92 |
|
patrick@73
|
93 |
blanks.section.content =
|
patrick@73
|
94 |
section.head?,
|
patrick@73
|
95 |
(blanks.section+ | blanks.block+)
|
Coraline@409
|
96 |
blanks-m.section.content =
|
Coraline@409
|
97 |
section.head?,
|
Coraline@409
|
98 |
(blanks-m.section+ | blanks-m.block+)
|
Coraline@441
|
99 |
blanks-c.section.content =
|
Coraline@441
|
100 |
section.head?,
|
Coraline@441
|
101 |
(blanks-c.section+ | blanks-c.block+)
|
Coraline@442
|
102 |
correct.section.content =
|
Coraline@442
|
103 |
section.head?,
|
Coraline@442
|
104 |
(correct.section+ | correct.block+)
|
Patrick@336
|
105 |
pointing.section.content =
|
patrick@73
|
106 |
section.head?,
|
Patrick@336
|
107 |
(pointing.section+ | pointing.block+)
|
patrick@73
|
108 |
|
patrick@73
|
109 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
110 |
|
patrick@73
|
111 |
instructions = element instructions { section.content }
|
patrick@73
|
112 |
|
patrick@73
|
113 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
114 |
|
patrick@73
|
115 |
engine =
|
patrick@87
|
116 |
choices-radio
|
patrick@87
|
117 |
| choices-check
|
patrick@87
|
118 |
| blanks-fill
|
patrick@87
|
119 |
| blanks-select
|
Coraline@409
|
120 |
| blanks-media
|
Coraline@441
|
121 |
| blanks-choices
|
Coraline@442
|
122 |
| correct-line
|
Patrick@336
|
123 |
| pointing
|
Patrick@336
|
124 |
| pointing-categories
|
patrick@73
|
125 |
| matching
|
patrick@73
|
126 |
| sort
|
patrick@125
|
127 |
| categories
|
Coraline@438
|
128 |
| wordsearch
|
Patrick@448
|
129 |
| flashcard
|
patrick@87
|
130 |
| production
|
patrick@73
|
131 |
|
patrick@73
|
132 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
133 |
|
patrick@87
|
134 |
choices-radio = element choices-radio {
|
Patrick@376
|
135 |
choices-radio.attributes, choices-radio.content }
|
patrick@87
|
136 |
choices-check = element choices-check {
|
Patrick@376
|
137 |
choices-check.attributes, choices-check.content }
|
patrick@73
|
138 |
|
Patrick@376
|
139 |
choices-radio.attributes =
|
patrick@73
|
140 |
shuffle.attribute?
|
Patrick@376
|
141 |
choices-check.attributes =
|
Patrick@376
|
142 |
success.attribute?
|
Patrick@376
|
143 |
& shuffle.attribute?
|
Patrick@376
|
144 |
success.attribute = attribute success { xsd:decimal {maxInclusive="1"} }
|
patrick@73
|
145 |
shuffle.attribute = attribute shuffle { xsd:boolean }
|
patrick@73
|
146 |
|
patrick@87
|
147 |
choices-radio.content =
|
patrick@73
|
148 |
choices.right
|
patrick@73
|
149 |
& choices.wrong+
|
patrick@87
|
150 |
choices-check.content =
|
patrick@73
|
151 |
(choices.right | choices.wrong)+
|
patrick@73
|
152 |
|
patrick@73
|
153 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
154 |
|
patrick@87
|
155 |
blanks-fill = element blanks-fill {
|
patrick@87
|
156 |
blanks-fill.attributes, blanks-fill.content }
|
patrick@87
|
157 |
blanks-select = element blanks-select {
|
patrick@87
|
158 |
blanks-select.attributes, blanks-select.content }
|
Coraline@409
|
159 |
blanks-media = element blanks-media {
|
Coraline@409
|
160 |
blanks-select.attributes, blanks-media.content }
|
Coraline@441
|
161 |
blanks-choices = element blanks-choices {
|
Coraline@441
|
162 |
blanks-choices.content }
|
patrick@73
|
163 |
|
patrick@87
|
164 |
blanks-fill.attributes =
|
Patrick@376
|
165 |
success.attribute?
|
Patrick@376
|
166 |
& strict.attribute?
|
claire@381
|
167 |
& long.attribute?
|
patrick@87
|
168 |
blanks-select.attributes =
|
Patrick@376
|
169 |
success.attribute?
|
Patrick@376
|
170 |
& multiple.attribute?
|
claire@380
|
171 |
& noshuffle.attribute?
|
Coraline@409
|
172 |
& orientation.attribute?
|
patrick@73
|
173 |
strict.attribute = attribute strict { xsd:boolean }
|
patrick@73
|
174 |
multiple.attribute = attribute multiple { xsd:boolean }
|
Coraline@437
|
175 |
noshuffle.attribute = attribute no-shuffle { "true" | "false" | "alpha" }
|
claire@381
|
176 |
long.attribute = attribute long { xsd:positiveInteger }
|
Coraline@409
|
177 |
orientation.attribute = attribute orientation {"north"|"east"|"west"|"south"}
|
patrick@73
|
178 |
|
patrick@87
|
179 |
blanks-fill.content =
|
patrick@73
|
180 |
(blanks.block+ | blanks.section+)
|
patrick@87
|
181 |
blanks-select.content =
|
Patrick@342
|
182 |
blanks.intruders?,
|
patrick@73
|
183 |
(blanks.block+ | blanks.section+)
|
Coraline@409
|
184 |
blanks-media.content =
|
Coraline@409
|
185 |
blanks-m.intruders?,
|
Coraline@409
|
186 |
(blanks-m.block+ | blanks-m.section+)
|
Coraline@441
|
187 |
blanks-choices.content =
|
Coraline@441
|
188 |
(blanks-c.block+ | blanks-c.section+)
|
patrick@73
|
189 |
|
Coraline@442
|
190 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@448
|
191 |
|
Patrick@448
|
192 |
correct-line = element correct-line { correct.attributes, correct.content }
|
Coraline@442
|
193 |
|
Coraline@442
|
194 |
correct.attributes =
|
Coraline@402
|
195 |
remove-space.attribute?
|
Coraline@402
|
196 |
remove-space.attribute = attribute remove-space { xsd:boolean }
|
Coraline@402
|
197 |
|
Coraline@442
|
198 |
correct.content =
|
Coraline@442
|
199 |
correct.intruders?,
|
Coraline@442
|
200 |
(correct.block+ | correct.section+)
|
Coraline@442
|
201 |
|
Patrick@336
|
202 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
203 |
|
Patrick@336
|
204 |
pointing = element pointing { pointing.attributes, pointing.content }
|
patrick@75
|
205 |
|
Patrick@336
|
206 |
pointing.attributes =
|
Patrick@376
|
207 |
success.attribute?
|
Patrick@376
|
208 |
& pointing.type.attribute?
|
Patrick@336
|
209 |
pointing.type.attribute = attribute type { "radio" | "check" }
|
patrick@73
|
210 |
|
Patrick@336
|
211 |
pointing.content =
|
Patrick@336
|
212 |
(pointing.section+ | pointing.block+)
|
Patrick@336
|
213 |
|
Patrick@336
|
214 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing-categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@336
|
215 |
|
Patrick@336
|
216 |
# ~~~~~~ pointing-categories
|
Patrick@376
|
217 |
pointing-categories = element pointing-categories {
|
Patrick@376
|
218 |
pointing-c.attributes, pointing-c.content }
|
Patrick@376
|
219 |
|
Patrick@376
|
220 |
pointing-c.attributes =
|
Patrick@376
|
221 |
success.attribute?
|
Patrick@336
|
222 |
|
Patrick@336
|
223 |
pointing-c.content =
|
Patrick@336
|
224 |
pointing-c.categories,
|
Patrick@336
|
225 |
pointing.section
|
Patrick@336
|
226 |
|
Patrick@336
|
227 |
# ~~~~~~ pointing-c.categories
|
Patrick@336
|
228 |
pointing-c.categories = element categories { pointing-c.categories.content }
|
Patrick@336
|
229 |
|
Patrick@336
|
230 |
pointing-c.categories.content =
|
Patrick@336
|
231 |
pointing-c.category1,
|
Patrick@336
|
232 |
pointing-c.category2,
|
Patrick@336
|
233 |
(pointing-c.category3,
|
Patrick@336
|
234 |
(pointing-c.category4, pointing-c.category5?)?)?
|
Patrick@336
|
235 |
|
Patrick@336
|
236 |
# ~~~~~~ pointing-c.categoryN
|
Patrick@336
|
237 |
pointing-c.category1 = element category {
|
Patrick@336
|
238 |
attribute id { "1" }, pointing-c.category.content }
|
Patrick@336
|
239 |
pointing-c.category2 = element category {
|
Patrick@336
|
240 |
attribute id { "2" }, pointing-c.category.content }
|
Patrick@336
|
241 |
pointing-c.category3 = element category {
|
Patrick@336
|
242 |
attribute id { "3" }, pointing-c.category.content }
|
Patrick@336
|
243 |
pointing-c.category4 = element category {
|
Patrick@336
|
244 |
attribute id { "4" }, pointing-c.category.content }
|
Patrick@336
|
245 |
pointing-c.category5 = element category {
|
Patrick@336
|
246 |
attribute id { "5" }, pointing-c.category.content }
|
Patrick@336
|
247 |
|
Patrick@336
|
248 |
pointing-c.category.content = inlines
|
Patrick@336
|
249 |
|
patrick@73
|
250 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
251 |
|
Patrick@161
|
252 |
# ~~~~~~ matching
|
Patrick@169
|
253 |
matching = element matching { matching.attributes, matching.content }
|
Patrick@169
|
254 |
|
Patrick@169
|
255 |
matching.attributes =
|
Patrick@376
|
256 |
success.attribute?
|
Patrick@376
|
257 |
& multiple.attribute?
|
Coraline@438
|
258 |
& noshuffle.attribute?
|
Coraline@409
|
259 |
& orientation.attribute?
|
patrick@75
|
260 |
|
patrick@73
|
261 |
matching.content =
|
Patrick@359
|
262 |
matching.intruders?,
|
patrick@73
|
263 |
match,
|
patrick@73
|
264 |
match+
|
patrick@73
|
265 |
|
Patrick@161
|
266 |
# ~~~~~~ match
|
Patrick@161
|
267 |
match = element match { match.content }
|
Patrick@161
|
268 |
|
Patrick@161
|
269 |
match.content =
|
Patrick@161
|
270 |
match.item,
|
Patrick@161
|
271 |
match.item
|
Patrick@161
|
272 |
|
patrick@73
|
273 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
274 |
|
patrick@73
|
275 |
sort = element sort { sort.attributes, sort.content }
|
patrick@73
|
276 |
|
patrick@73
|
277 |
sort.attributes =
|
Patrick@376
|
278 |
success.attribute?
|
Patrick@376
|
279 |
& shuffle.attribute?
|
Coraline@409
|
280 |
& orientation.attribute?
|
patrick@75
|
281 |
|
patrick@73
|
282 |
sort.content =
|
patrick@73
|
283 |
comparison?,
|
patrick@73
|
284 |
sort.item,
|
patrick@73
|
285 |
sort.item+
|
patrick@73
|
286 |
|
patrick@125
|
287 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
288 |
|
Patrick@310
|
289 |
# ~~~~~~ category.head
|
Patrick@310
|
290 |
category.head = element head { category.head.content }
|
Patrick@310
|
291 |
|
Patrick@310
|
292 |
category.head.content =
|
Patrick@384
|
293 |
title
|
Patrick@384
|
294 |
& shorttitle?
|
Patrick@384
|
295 |
& subtitle*
|
Patrick@310
|
296 |
|
patrick@125
|
297 |
# ~~~~~~ categories
|
Patrick@168
|
298 |
categories = element categories { categories.attributes, categories.content }
|
patrick@125
|
299 |
|
Patrick@168
|
300 |
categories.attributes =
|
Patrick@376
|
301 |
success.attribute?
|
Patrick@376
|
302 |
& multiple.attribute?
|
claire@380
|
303 |
& noshuffle.attribute?
|
Coraline@409
|
304 |
& orientation.attribute?
|
Patrick@310
|
305 |
|
patrick@125
|
306 |
categories.content =
|
Patrick@344
|
307 |
categories.intruders?,
|
patrick@125
|
308 |
category,
|
patrick@125
|
309 |
category+
|
patrick@125
|
310 |
|
patrick@125
|
311 |
# ~~~~~~ category
|
patrick@125
|
312 |
category = element category { category.content }
|
patrick@125
|
313 |
|
patrick@125
|
314 |
category.content =
|
patrick@125
|
315 |
category.head,
|
patrick@125
|
316 |
category.item*
|
patrick@125
|
317 |
|
Coraline@438
|
318 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@448
|
319 |
|
Coraline@438
|
320 |
wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content }
|
Coraline@438
|
321 |
|
Coraline@438
|
322 |
wordsearch.attributes =
|
Coraline@438
|
323 |
strict.attribute ?
|
Coraline@438
|
324 |
& wordlist.attribute ?
|
Coraline@438
|
325 |
|
Coraline@438
|
326 |
wordlist.attribute = attribute wordlist { "hidden" | "right" | "left" }
|
Coraline@438
|
327 |
|
Coraline@438
|
328 |
wordsearch.content =
|
Coraline@438
|
329 |
words
|
Coraline@438
|
330 |
& grid
|
Coraline@438
|
331 |
|
Coraline@438
|
332 |
# ~~~~~~ words
|
Coraline@438
|
333 |
words = element words {words.content}
|
Coraline@438
|
334 |
words.content = words.item+
|
Coraline@438
|
335 |
|
Coraline@438
|
336 |
# ~~~~~~ grid
|
Coraline@438
|
337 |
grid = element grid {grid.content}
|
Coraline@438
|
338 |
grid.content = line+
|
Coraline@438
|
339 |
|
Coraline@438
|
340 |
line = element line {line.content}
|
Coraline@438
|
341 |
line.content = cell+
|
Coraline@438
|
342 |
|
Coraline@438
|
343 |
cell = element cell {cell.content}
|
Coraline@438
|
344 |
cell.content = xsd:token {pattern = "."}
|
Coraline@438
|
345 |
|
Patrick@448
|
346 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flashcard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@448
|
347 |
|
Patrick@448
|
348 |
# ~~~~~~ flashcard
|
Patrick@448
|
349 |
flashcard = element flashcard { flashcard.content }
|
Patrick@448
|
350 |
|
Patrick@448
|
351 |
flashcard.content =
|
Patrick@448
|
352 |
side1,
|
Patrick@448
|
353 |
side2
|
Patrick@448
|
354 |
|
Patrick@448
|
355 |
# ~~~~~~ side1
|
Patrick@448
|
356 |
side1 = element side1 { side1.content }
|
Patrick@448
|
357 |
|
Patrick@448
|
358 |
side1.content =
|
Patrick@448
|
359 |
section+ | block+
|
Patrick@448
|
360 |
|
Patrick@448
|
361 |
# ~~~~~~ side2
|
Patrick@448
|
362 |
side2 = element side2 { side2.content }
|
Patrick@448
|
363 |
|
Patrick@448
|
364 |
side2.content =
|
Patrick@448
|
365 |
instructions?,
|
Patrick@448
|
366 |
flashcard.engine,
|
Patrick@448
|
367 |
help?,
|
Patrick@448
|
368 |
answer?
|
Patrick@448
|
369 |
|
Patrick@448
|
370 |
# ~~~~~~ flashcard.engine
|
Patrick@448
|
371 |
flashcard.engine =
|
Patrick@448
|
372 |
choices-radio
|
Patrick@448
|
373 |
| choices-check
|
Patrick@448
|
374 |
| blanks-fill
|
Patrick@448
|
375 |
| blanks-select
|
Patrick@448
|
376 |
| sort
|
Patrick@448
|
377 |
|
patrick@87
|
378 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@87
|
379 |
|
Coraline@407
|
380 |
production = element production { production.content }
|
Coraline@407
|
381 |
|
Coraline@407
|
382 |
production.content = text
|
patrick@87
|
383 |
|
patrick@73
|
384 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
385 |
|
patrick@77
|
386 |
# ~~~~~~ composite
|
Patrick@161
|
387 |
composite = element composite { composite.attributes, composite.content }
|
Patrick@161
|
388 |
|
Patrick@161
|
389 |
composite.attributes =
|
Patrick@376
|
390 |
success.attribute?
|
Patrick@376
|
391 |
& multipage.attribute?
|
Patrick@310
|
392 |
multipage.attribute = attribute multipage { xsd:boolean }
|
patrick@75
|
393 |
|
patrick@73
|
394 |
composite.content =
|
patrick@85
|
395 |
subquiz,
|
Patrick@154
|
396 |
subquiz+
|
patrick@77
|
397 |
|
patrick@85
|
398 |
# ~~~~~~ subquiz
|
patrick@85
|
399 |
subquiz = element subquiz { subquiz.content }
|
patrick@77
|
400 |
|
patrick@85
|
401 |
subquiz.content =
|
patrick@77
|
402 |
instructions?,
|
Patrick@141
|
403 |
engine,
|
Patrick@141
|
404 |
help?,
|
Patrick@141
|
405 |
answer?
|
patrick@73
|
406 |
|
patrick@73
|
407 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
408 |
|
patrick@73
|
409 |
help = element help { help.content }
|
patrick@73
|
410 |
|
patrick@73
|
411 |
help.content =
|
patrick@73
|
412 |
(section+ | block+)?,
|
patrick@73
|
413 |
link*
|
patrick@73
|
414 |
|
patrick@87
|
415 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
416 |
|
patrick@87
|
417 |
answer = element answer { answer.content }
|
patrick@73
|
418 |
|
patrick@87
|
419 |
answer.content =
|
patrick@81
|
420 |
(section+ | block+)?,
|
patrick@80
|
421 |
link*
|
patrick@73
|
422 |
|
patrick@73
|
423 |
|
patrick@73
|
424 |
# =============================================================================
|
patrick@73
|
425 |
# BLOCK LEVEL
|
patrick@73
|
426 |
# =============================================================================
|
patrick@73
|
427 |
|
patrick@73
|
428 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
429 |
|
Patrick@313
|
430 |
blanks.block = (
|
Patrick@313
|
431 |
blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
|
Patrick@313
|
432 |
| blanks.media)
|
Coraline@409
|
433 |
blanks-m.block = (
|
Coraline@409
|
434 |
blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
|
Coraline@409
|
435 |
| blanks-m.table | blanks-m.media)
|
Coraline@441
|
436 |
blanks-c.block = (
|
Coraline@441
|
437 |
blanks-c.p | blanks-c.list | blanks-c.blockquote | blanks-c.speech
|
Coraline@441
|
438 |
| blanks-c.table | blanks-c.media)
|
Coraline@442
|
439 |
correct.block = (
|
Coraline@442
|
440 |
correct.p | correct.list | correct.blockquote | correct.speech
|
Coraline@442
|
441 |
| correct.table | media)
|
Patrick@336
|
442 |
pointing.block = (
|
Patrick@336
|
443 |
pointing.p | pointing.list | pointing.blockquote | pointing.speech
|
Patrick@336
|
444 |
| pointing.table | media)
|
patrick@73
|
445 |
|
patrick@73
|
446 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
447 |
|
patrick@73
|
448 |
blanks.p = element p { blanks.p.content }
|
Coraline@409
|
449 |
blanks-m.p = element p { blanks-m.p.content }
|
Coraline@441
|
450 |
blanks-c.p = element p { blanks-c.p.content }
|
Coraline@442
|
451 |
correct.p = element p { correct.p.content }
|
Patrick@336
|
452 |
pointing.p = element p { pointing.p.content }
|
patrick@73
|
453 |
|
patrick@73
|
454 |
blanks.p.content =
|
patrick@75
|
455 |
blanks.inlines
|
Coraline@409
|
456 |
blanks-m.p.content =
|
Coraline@409
|
457 |
blanks-m.inlines
|
Coraline@441
|
458 |
blanks-c.p.content =
|
Coraline@441
|
459 |
blanks-c.inlines
|
Coraline@442
|
460 |
correct.p.content =
|
Coraline@442
|
461 |
correct.inlines
|
Patrick@336
|
462 |
pointing.p.content =
|
Patrick@336
|
463 |
pointing.inlines
|
patrick@73
|
464 |
|
patrick@73
|
465 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
466 |
|
patrick@73
|
467 |
# ~~~~~~ list
|
patrick@75
|
468 |
blanks.list = element list {
|
patrick@73
|
469 |
block.head?,
|
patrick@73
|
470 |
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
|
Coraline@422
|
471 |
| (attribute type {"glossary"}, item.glossary+) )
|
patrick@75
|
472 |
}
|
Coraline@409
|
473 |
blanks-m.list = element list {
|
Coraline@409
|
474 |
block.head?,
|
Coraline@441
|
475 |
( (attribute type {"ordered"}?, blanks-m.item, blanks-m.item+)
|
Coraline@441
|
476 |
| (attribute type {"glossary"}, item.glossary+) )
|
Coraline@441
|
477 |
}
|
Coraline@441
|
478 |
blanks-c.list = element list {
|
Coraline@441
|
479 |
block.head?,
|
Coraline@409
|
480 |
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
|
Coraline@422
|
481 |
| (attribute type {"glossary"}, item.glossary+) )
|
Coraline@409
|
482 |
}
|
Coraline@442
|
483 |
correct.list = element list {
|
Coraline@442
|
484 |
block.head?,
|
Coraline@442
|
485 |
( (attribute type {"ordered"}?, correct.item, correct.item+)
|
Coraline@442
|
486 |
| (attribute type {"glossary"}, item.glossary+) )
|
Coraline@442
|
487 |
}
|
Patrick@336
|
488 |
pointing.list = element list {
|
patrick@73
|
489 |
block.head?,
|
Patrick@336
|
490 |
( (attribute type {"ordered"}?, pointing.item, pointing.item+)
|
Coraline@422
|
491 |
| (attribute type {"glossary"}, item.glossary+) )
|
patrick@75
|
492 |
}
|
patrick@73
|
493 |
|
patrick@73
|
494 |
# ~~~~~~ item
|
patrick@73
|
495 |
blanks.item = element item { blanks.item.content }
|
Coraline@441
|
496 |
blanks-m.item = element item { blanks-m.item.content }
|
Coraline@441
|
497 |
blanks-c.item = element item { blanks-c.item.content }
|
Coraline@442
|
498 |
correct.item = element item { correct.item.content }
|
Patrick@336
|
499 |
pointing.item = element item { pointing.item.content }
|
Coraline@442
|
500 |
|
patrick@73
|
501 |
|
Coraline@442
|
502 |
blanks.item.content = blanks.inlines | blanks.block+
|
Coraline@442
|
503 |
blanks-m.item.content = blanks-m.inlines | blanks-m.block+
|
Coraline@442
|
504 |
blanks-c.item.content = blanks-c.inlines | blanks-c.block+
|
Coraline@442
|
505 |
correct.item.content = correct.inlines | correct.block+
|
Coraline@442
|
506 |
pointing.item.content = pointing.inlines | pointing.block+
|
patrick@73
|
507 |
|
Patrick@313
|
508 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@313
|
509 |
|
Patrick@313
|
510 |
blanks.blockquote = element blockquote {
|
Patrick@313
|
511 |
blockquote.attributes, blanks.blockquote.content }
|
Coraline@409
|
512 |
blanks-m.blockquote = element blockquote {
|
Coraline@409
|
513 |
blockquote.attributes, blanks-m.blockquote.content }
|
Coraline@441
|
514 |
blanks-c.blockquote = element blockquote {
|
Coraline@441
|
515 |
blockquote.attributes, blanks-c.blockquote.content }
|
Coraline@442
|
516 |
correct.blockquote = element blockquote {
|
Coraline@442
|
517 |
blockquote.attributes, correct.blockquote.content }
|
Patrick@336
|
518 |
pointing.blockquote = element blockquote {
|
Patrick@336
|
519 |
blockquote.attributes, pointing.blockquote.content }
|
Patrick@313
|
520 |
|
Patrick@313
|
521 |
blanks.blockquote.content =
|
Patrick@313
|
522 |
block.head?,
|
Patrick@313
|
523 |
(blanks.p | speech | blanks.list)+,
|
Patrick@313
|
524 |
attribution?
|
Coraline@409
|
525 |
blanks-m.blockquote.content =
|
Coraline@409
|
526 |
block.head?,
|
Coraline@409
|
527 |
(blanks-m.p | speech | blanks-m.list)+,
|
Coraline@409
|
528 |
attribution?
|
Coraline@441
|
529 |
blanks-c.blockquote.content =
|
Coraline@441
|
530 |
block.head?,
|
Coraline@441
|
531 |
(blanks-c.p | speech | blanks-c.list)+,
|
Coraline@441
|
532 |
attribution?
|
Coraline@442
|
533 |
correct.blockquote.content =
|
Coraline@442
|
534 |
block.head?,
|
Coraline@442
|
535 |
(correct.p | speech | correct.list)+,
|
Coraline@442
|
536 |
attribution?
|
Patrick@336
|
537 |
pointing.blockquote.content =
|
Patrick@313
|
538 |
block.head?,
|
Patrick@336
|
539 |
(pointing.p | speech | pointing.list)+,
|
Patrick@313
|
540 |
attribution?
|
Patrick@313
|
541 |
|
Patrick@313
|
542 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@313
|
543 |
|
Patrick@313
|
544 |
# ~~~~~~ speech
|
Patrick@313
|
545 |
blanks.speech = element speech { blanks.speech.content }
|
Coraline@409
|
546 |
blanks-m.speech = element speech { blanks-m.speech.content }
|
Coraline@441
|
547 |
blanks-c.speech = element speech { blanks-c.speech.content }
|
Coraline@442
|
548 |
correct.speech = element speech { correct.speech.content }
|
Patrick@336
|
549 |
pointing.speech = element speech { pointing.speech.content }
|
Patrick@313
|
550 |
|
Patrick@313
|
551 |
blanks.speech.content =
|
Patrick@313
|
552 |
blanks.speaker?,
|
Patrick@313
|
553 |
stage?,
|
Patrick@313
|
554 |
(blanks.p | blanks.blockquote)+
|
Coraline@409
|
555 |
blanks-m.speech.content =
|
Coraline@409
|
556 |
blanks-m.speaker?,
|
Coraline@409
|
557 |
stage?,
|
Coraline@409
|
558 |
(blanks-m.p | blanks-m.blockquote)+
|
Coraline@441
|
559 |
blanks-c.speech.content =
|
Coraline@441
|
560 |
blanks-c.speaker?,
|
Coraline@441
|
561 |
stage?,
|
Coraline@441
|
562 |
(blanks-c.p | blanks-c.blockquote)+
|
Coraline@442
|
563 |
correct.speech.content =
|
Coraline@442
|
564 |
correct.speaker?,
|
Coraline@442
|
565 |
stage?,
|
Coraline@442
|
566 |
(correct.p | correct.blockquote)+
|
Patrick@336
|
567 |
pointing.speech.content =
|
Patrick@336
|
568 |
pointing.speaker?,
|
Patrick@313
|
569 |
stage?,
|
Patrick@336
|
570 |
(pointing.p | pointing.blockquote)+
|
Patrick@313
|
571 |
|
Patrick@313
|
572 |
# ~~~~~~ speaker
|
Patrick@313
|
573 |
blanks.speaker = element speaker { blanks.speaker.content }
|
Coraline@409
|
574 |
blanks-m.speaker = element speaker { blanks-m.speaker.content }
|
Coraline@441
|
575 |
blanks-c.speaker = element speaker { blanks-c.speaker.content }
|
Coraline@442
|
576 |
correct.speaker = element speaker { correct.speaker.content }
|
Patrick@336
|
577 |
pointing.speaker = element speaker { pointing.speaker.content }
|
Patrick@313
|
578 |
|
Patrick@313
|
579 |
blanks.speaker.content = blanks.inlines
|
Coraline@409
|
580 |
blanks-m.speaker.content = blanks-m.inlines
|
Coraline@441
|
581 |
blanks-c.speaker.content = blanks-c.inlines
|
Coraline@442
|
582 |
correct.speaker.content = correct.inlines
|
Patrick@336
|
583 |
pointing.speaker.content = pointing.inlines
|
Patrick@313
|
584 |
|
patrick@73
|
585 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
586 |
|
Patrick@313
|
587 |
# ~~~~~~ table
|
patrick@249
|
588 |
blanks.table = element table { table.attributes, blanks.table.content }
|
Coraline@409
|
589 |
blanks-m.table = element table { table.attributes, blanks-m.table.content }
|
Coraline@441
|
590 |
blanks-c.table = element table { table.attributes, blanks-m.table.content }
|
Coraline@442
|
591 |
correct.table = element table { table.attributes, correct.table.content }
|
Patrick@336
|
592 |
pointing.table = element table { table.attributes, pointing.table.content }
|
patrick@73
|
593 |
|
patrick@73
|
594 |
blanks.table.content =
|
patrick@73
|
595 |
block.head?,
|
Patrick@358
|
596 |
((thead?, blanks.tbody+) | blanks.tr+),
|
Patrick@313
|
597 |
blanks.table.caption?
|
Coraline@409
|
598 |
blanks-m.table.content =
|
Coraline@409
|
599 |
block.head?,
|
Coraline@409
|
600 |
((thead?, blanks-m.tbody+) | blanks-m.tr+),
|
Coraline@409
|
601 |
blanks-m.table.caption?
|
Coraline@441
|
602 |
blanks-c.table.content =
|
Coraline@441
|
603 |
block.head?,
|
Coraline@441
|
604 |
((thead?, blanks-c.tbody+) | blanks-c.tr+),
|
Coraline@441
|
605 |
blanks-c.table.caption?
|
Coraline@442
|
606 |
correct.table.content =
|
Coraline@442
|
607 |
block.head?,
|
Coraline@442
|
608 |
((thead?, correct.tbody+) | correct.tr+),
|
Coraline@442
|
609 |
correct.table.caption?
|
Patrick@336
|
610 |
pointing.table.content =
|
patrick@73
|
611 |
block.head?,
|
Patrick@358
|
612 |
((thead?, pointing.tbody+) | pointing.tr+),
|
Patrick@336
|
613 |
pointing.table.caption?
|
patrick@73
|
614 |
|
patrick@73
|
615 |
# ~~~~~~ tbody
|
patrick@249
|
616 |
blanks.tbody = element tbody { blanks.tbody.content }
|
Coraline@409
|
617 |
blanks-m.tbody = element tbody { blanks-m.tbody.content }
|
Coraline@441
|
618 |
blanks-c.tbody = element tbody { blanks-m.tbody.content }
|
Coraline@442
|
619 |
correct.tbody = element tbody { correct.tbody.content }
|
Patrick@336
|
620 |
pointing.tbody = element tbody { pointing.tbody.content }
|
patrick@73
|
621 |
|
patrick@73
|
622 |
blanks.tbody.content =
|
patrick@249
|
623 |
blanks.tr+
|
Coraline@409
|
624 |
blanks-m.tbody.content =
|
Coraline@409
|
625 |
blanks-m.tr+
|
Coraline@441
|
626 |
blanks-c.tbody.content =
|
Coraline@441
|
627 |
blanks-c.tr+
|
Coraline@442
|
628 |
correct.tbody.content =
|
Coraline@442
|
629 |
correct.tr+
|
Patrick@336
|
630 |
pointing.tbody.content =
|
Patrick@336
|
631 |
pointing.tr+
|
patrick@73
|
632 |
|
patrick@249
|
633 |
# ~~~~~~ tr
|
patrick@249
|
634 |
blanks.tr = element tr { tr.attributes, blanks.tr.content }
|
Coraline@409
|
635 |
blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
|
Coraline@441
|
636 |
blanks-c.tr = element tr { tr.attributes, blanks-c.tr.content }
|
Coraline@442
|
637 |
correct.tr = element tr { tr.attributes, correct.tr.content }
|
Patrick@336
|
638 |
pointing.tr = element tr { tr.attributes, pointing.tr.content }
|
patrick@73
|
639 |
|
patrick@249
|
640 |
blanks.tr.content =
|
patrick@249
|
641 |
(blanks.td | blanks.th)+
|
Coraline@409
|
642 |
blanks-m.tr.content =
|
Coraline@409
|
643 |
(blanks-m.td | blanks-m.th)+
|
Coraline@441
|
644 |
blanks-c.tr.content =
|
Coraline@441
|
645 |
(blanks-c.td | blanks-c.th)+
|
Coraline@442
|
646 |
correct.tr.content =
|
Coraline@442
|
647 |
(correct.td | correct.th)+
|
Patrick@336
|
648 |
pointing.tr.content =
|
Patrick@336
|
649 |
(pointing.td | pointing.th)+
|
patrick@73
|
650 |
|
patrick@249
|
651 |
# ~~~~~~ td, th
|
patrick@249
|
652 |
blanks.td = element td { td.attributes, blanks.td.content }
|
patrick@249
|
653 |
blanks.th = element th { td.attributes, blanks.td.content }
|
Coraline@409
|
654 |
blanks-m.td = element td { td.attributes, blanks-m.td.content }
|
Coraline@409
|
655 |
blanks-m.th = element th { td.attributes, blanks-m.td.content }
|
Coraline@441
|
656 |
blanks-c.td = element td { td.attributes, blanks-c.td.content }
|
Coraline@441
|
657 |
blanks-c.th = element th { td.attributes, blanks-c.td.content }
|
Coraline@442
|
658 |
correct.td = element td { td.attributes, correct.td.content }
|
Coraline@442
|
659 |
correct.th = element th { td.attributes, correct.td.content }
|
Patrick@336
|
660 |
pointing.td = element td { td.attributes, pointing.td.content }
|
Patrick@336
|
661 |
pointing.th = element th { td.attributes, pointing.td.content }
|
patrick@73
|
662 |
|
patrick@249
|
663 |
blanks.td.content =
|
patrick@75
|
664 |
blanks.inlines
|
Patrick@313
|
665 |
| (blanks.p | blanks.media)+
|
Coraline@409
|
666 |
blanks-m.td.content =
|
Coraline@409
|
667 |
blanks-m.inlines
|
Coraline@409
|
668 |
| (blanks-m.p | blanks-m.media)+
|
Coraline@441
|
669 |
blanks-c.td.content =
|
Coraline@441
|
670 |
blanks-c.inlines
|
Coraline@441
|
671 |
| (blanks-c.p | blanks-c.media)+
|
Coraline@442
|
672 |
correct.td.content =
|
Coraline@442
|
673 |
correct.inlines
|
Coraline@442
|
674 |
| (correct.p | media)+
|
Patrick@336
|
675 |
pointing.td.content =
|
Patrick@336
|
676 |
pointing.inlines
|
Patrick@336
|
677 |
| (pointing.p | media)+
|
Patrick@313
|
678 |
|
Patrick@313
|
679 |
# ~~~~~~ table.caption
|
Patrick@313
|
680 |
blanks.table.caption = element caption { blanks.caption.content }
|
Coraline@409
|
681 |
blanks-m.table.caption = element caption { blanks-m.caption.content }
|
Coraline@441
|
682 |
blanks-c.table.caption = element caption { blanks-c.caption.content }
|
Coraline@442
|
683 |
correct.table.caption = element caption { correct.caption.content }
|
Patrick@336
|
684 |
pointing.table.caption = element caption { pointing.caption.content }
|
Patrick@313
|
685 |
|
Patrick@313
|
686 |
blanks.caption.content =
|
Patrick@313
|
687 |
blanks.inlines
|
Patrick@313
|
688 |
| (blanks.p | speech | blanks.list | blockquote)+
|
Coraline@409
|
689 |
blanks-m.caption.content =
|
Coraline@409
|
690 |
blanks-m.inlines
|
Coraline@409
|
691 |
| (blanks-m.p | speech | blanks-m.list | blockquote)+
|
Coraline@441
|
692 |
blanks-c.caption.content =
|
Coraline@441
|
693 |
blanks-c.inlines
|
Coraline@441
|
694 |
| (blanks-c.p | speech | blanks-c.list | blockquote)+
|
Coraline@442
|
695 |
correct.caption.content =
|
Coraline@442
|
696 |
correct.inlines
|
Coraline@442
|
697 |
| (correct.p | speech | correct.list | blockquote)+
|
Patrick@336
|
698 |
pointing.caption.content =
|
Patrick@336
|
699 |
pointing.inlines
|
Patrick@336
|
700 |
| (pointing.p | speech | pointing.list | blockquote)+
|
patrick@73
|
701 |
|
Patrick@174
|
702 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@174
|
703 |
|
Patrick@313
|
704 |
# ~~~~~~ media
|
Patrick@313
|
705 |
blanks.media = element media { media.attributes, blanks.media.content }
|
Coraline@409
|
706 |
blanks-m.media = element media { media.attributes, blanks-m.media.content }
|
Coraline@441
|
707 |
blanks-c.media = element media { media.attributes, blanks-c.media.content }
|
Coraline@442
|
708 |
correct.media = element media { media.attributes, correct.media.content }
|
Patrick@336
|
709 |
pointing.media = element media { media.attributes, pointing.media.content }
|
Patrick@174
|
710 |
|
Patrick@313
|
711 |
blanks.media.content =
|
Patrick@174
|
712 |
block.head?,
|
Patrick@174
|
713 |
(blanks.image | audio | video)+,
|
Patrick@313
|
714 |
blanks.media.caption?,
|
Patrick@313
|
715 |
link?
|
Coraline@409
|
716 |
blanks-m.media.content =
|
Coraline@409
|
717 |
block.head?,
|
Coraline@409
|
718 |
(blanks-m.image | audio | video)+,
|
Coraline@409
|
719 |
blanks-m.media.caption?,
|
Coraline@409
|
720 |
link?
|
Coraline@441
|
721 |
blanks-c.media.content =
|
Coraline@441
|
722 |
block.head?,
|
Coraline@441
|
723 |
(image | audio | video)+,
|
Coraline@441
|
724 |
blanks-c.media.caption?,
|
Coraline@441
|
725 |
link?
|
Coraline@442
|
726 |
correct.media.content =
|
Coraline@442
|
727 |
block.head?,
|
Coraline@442
|
728 |
(image | audio | video)+,
|
Coraline@442
|
729 |
correct.media.caption?,
|
Coraline@442
|
730 |
link?
|
Patrick@336
|
731 |
pointing.media.content =
|
Patrick@313
|
732 |
block.head?,
|
Patrick@313
|
733 |
(image | audio | video)+,
|
Patrick@336
|
734 |
pointing.media.caption?,
|
Patrick@174
|
735 |
link?
|
Patrick@174
|
736 |
|
Patrick@174
|
737 |
# ~~~~~~ blanks.image
|
Patrick@174
|
738 |
blanks.image = element image { image.attributes, blanks.image.content }
|
Coraline@409
|
739 |
blanks-m.image = element image { image.attributes, blanks-m.image.content }
|
Patrick@174
|
740 |
|
Patrick@174
|
741 |
blanks.image.content =
|
Patrick@174
|
742 |
copyright?,
|
Patrick@192
|
743 |
blanks.dropzone*
|
Coraline@409
|
744 |
blanks-m.image.content =
|
Coraline@409
|
745 |
copyright?,
|
Coraline@409
|
746 |
blanks-m.dropzone*
|
Patrick@174
|
747 |
|
Patrick@313
|
748 |
# ~~~~~~ dropzone
|
Patrick@192
|
749 |
blanks.dropzone = element dropzone {
|
Patrick@192
|
750 |
blanks.dropzone.attributes, blanks.dropzone.content }
|
Coraline@409
|
751 |
blanks-m.dropzone = element dropzone {
|
Patrick@411
|
752 |
blanks-m.dropzone.attributes, blanks-m.dropzone.content }
|
Patrick@183
|
753 |
|
Patrick@192
|
754 |
blanks.dropzone.attributes =
|
Patrick@183
|
755 |
x.attribute
|
Patrick@310
|
756 |
& y.attribute
|
Patrick@411
|
757 |
blanks-m.dropzone.attributes =
|
patrick@194
|
758 |
x.attribute
|
patrick@194
|
759 |
& y.attribute
|
Coraline@412
|
760 |
& h.attribute
|
patrick@194
|
761 |
& w.attribute
|
Patrick@174
|
762 |
|
Patrick@192
|
763 |
blanks.dropzone.content =
|
Patrick@183
|
764 |
blank
|
Coraline@409
|
765 |
blanks-m.dropzone.content =
|
Coraline@409
|
766 |
blank-m
|
Patrick@174
|
767 |
|
Patrick@313
|
768 |
# ~~~~~~ media.caption
|
Patrick@313
|
769 |
blanks.media.caption = element caption {
|
Patrick@313
|
770 |
caption.attributes, blanks.caption.content }
|
Coraline@409
|
771 |
blanks-m.media.caption = element caption {
|
Coraline@409
|
772 |
caption.attributes, blanks-m.caption.content }
|
Coraline@441
|
773 |
blanks-c.media.caption = element caption {
|
Coraline@441
|
774 |
caption.attributes, blanks-c.caption.content }
|
Coraline@442
|
775 |
correct.media.caption = element caption {
|
Coraline@442
|
776 |
caption.attributes, correct.caption.content }
|
Patrick@336
|
777 |
pointing.media.caption = element caption {
|
Patrick@336
|
778 |
caption.attributes, pointing.caption.content }
|
Patrick@313
|
779 |
|
patrick@73
|
780 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
781 |
|
patrick@73
|
782 |
choices.right = element right { choices.right.content }
|
patrick@73
|
783 |
choices.wrong = element wrong { choices.right.content }
|
patrick@73
|
784 |
|
patrick@73
|
785 |
choices.right.content =
|
patrick@73
|
786 |
inlines
|
Patrick@161
|
787 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@73
|
788 |
|
Coraline@409
|
789 |
# ~~~~~~~~~~~~~~~~~~~~ blanks.intruders, blanks-m.intruders ~~~~~~~~~~~~~~~~~~
|
patrick@73
|
790 |
|
Patrick@342
|
791 |
blanks.intruders = element intruders { blanks.intruders.content }
|
Coraline@409
|
792 |
blanks-m.intruders = element intruders { blanks-m.intruders.content }
|
patrick@73
|
793 |
|
Coraline@409
|
794 |
blanks.intruders.content = blank+
|
Coraline@409
|
795 |
blanks-m.intruders.content = blank-m+
|
patrick@73
|
796 |
|
Coraline@442
|
797 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Coraline@442
|
798 |
|
Coraline@442
|
799 |
correct.intruders = element intruders { correct.intruders.content }
|
Coraline@442
|
800 |
|
Coraline@442
|
801 |
correct.intruders.content = char+
|
Coraline@442
|
802 |
|
Patrick@359
|
803 |
# ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
804 |
|
Patrick@359
|
805 |
# ~~~~~~~ matching.intruders
|
Patrick@359
|
806 |
matching.intruders = element intruders { matching.intruders.content }
|
Patrick@359
|
807 |
|
Patrick@359
|
808 |
matching.intruders.content =
|
Patrick@359
|
809 |
match.item+
|
Patrick@359
|
810 |
|
Patrick@359
|
811 |
# ~~~~~~~ match.item
|
Patrick@161
|
812 |
match.item = element item { match.item.content }
|
patrick@73
|
813 |
|
Patrick@161
|
814 |
match.item.content =
|
Patrick@161
|
815 |
inlines
|
Patrick@341
|
816 |
| (p, help?, answer?)
|
patrick@73
|
817 |
|
Patrick@313
|
818 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ comparison, sort.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
819 |
|
patrick@73
|
820 |
# ~~~~~~ comparison
|
patrick@73
|
821 |
comparison = element comparison { comparison.content }
|
patrick@73
|
822 |
|
patrick@73
|
823 |
comparison.content = inlines
|
patrick@73
|
824 |
|
patrick@73
|
825 |
# ~~~~~~ sort.item
|
patrick@73
|
826 |
sort.item = element item { sort.item.attributes, sort.item.content }
|
patrick@73
|
827 |
|
patrick@73
|
828 |
sort.item.attributes =
|
patrick@73
|
829 |
item.shuffle.attribute?
|
patrick@73
|
830 |
item.shuffle.attribute = attribute shuffle { xsd:integer }
|
patrick@73
|
831 |
|
Patrick@161
|
832 |
sort.item.content =
|
Patrick@161
|
833 |
inlines
|
Patrick@341
|
834 |
| (p, help?, answer?)
|
patrick@73
|
835 |
|
Patrick@344
|
836 |
# ~~~~~~~~~~~~~~~~~~~~~ categories.intruders, category.item ~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
837 |
|
Patrick@344
|
838 |
# ~~~~~~ categories.intruders
|
Patrick@344
|
839 |
categories.intruders = element intruders { categories.intruders.content }
|
Patrick@342
|
840 |
|
Patrick@344
|
841 |
categories.intruders.content =
|
Patrick@342
|
842 |
category.item+
|
Patrick@342
|
843 |
|
Patrick@342
|
844 |
# ~~~~~~ category.item
|
patrick@125
|
845 |
category.item = element item { category.item.content }
|
patrick@125
|
846 |
|
Patrick@161
|
847 |
category.item.content =
|
Patrick@161
|
848 |
inlines
|
Patrick@341
|
849 |
| (p, help?, answer?)
|
patrick@125
|
850 |
|
Coraline@438
|
851 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ words.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Coraline@438
|
852 |
words.item = element item {words.item.content, words.item.attributes }
|
Coraline@438
|
853 |
|
Coraline@438
|
854 |
words.item.content = inlines
|
Coraline@438
|
855 |
|
Coraline@438
|
856 |
words.item.attributes =
|
Coraline@438
|
857 |
startx
|
Coraline@438
|
858 |
& starty
|
Coraline@438
|
859 |
& endx
|
Coraline@438
|
860 |
& endy
|
Coraline@438
|
861 |
|
Coraline@438
|
862 |
startx = attribute startx {xsd:token {pattern = "[a-zA-Z]+"}}
|
Coraline@438
|
863 |
starty = attribute starty {xsd:token {pattern = "\d+"}}
|
Coraline@438
|
864 |
endx = attribute endx {xsd:token {pattern = "[a-zA-Z]+"}}
|
Coraline@438
|
865 |
endy = attribute endy {xsd:token {pattern = "\d+"}}
|
Coraline@438
|
866 |
|
patrick@73
|
867 |
|
patrick@73
|
868 |
# =============================================================================
|
patrick@73
|
869 |
# INLINE LEVEL
|
patrick@73
|
870 |
# =============================================================================
|
patrick@73
|
871 |
|
patrick@75
|
872 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@75
|
873 |
|
Patrick@293
|
874 |
blanks.inlines = mixed {
|
Patrick@293
|
875 |
sup*
|
Patrick@293
|
876 |
& sub*
|
Patrick@293
|
877 |
& var*
|
Patrick@293
|
878 |
& number*
|
Patrick@293
|
879 |
& acronym*
|
Patrick@293
|
880 |
& warning*
|
Patrick@293
|
881 |
|
Patrick@291
|
882 |
& highlight*
|
Patrick@291
|
883 |
& emphasis*
|
Patrick@291
|
884 |
& mentioned*
|
Patrick@350
|
885 |
& literal*
|
Patrick@350
|
886 |
& term*
|
Patrick@291
|
887 |
& stage*
|
Patrick@350
|
888 |
& name*
|
Patrick@350
|
889 |
& foreign*
|
Patrick@350
|
890 |
& date*
|
Patrick@350
|
891 |
& math*
|
Patrick@351
|
892 |
& quote*
|
Patrick@291
|
893 |
& initial*
|
Patrick@291
|
894 |
& note*
|
Patrick@291
|
895 |
& link*
|
Patrick@291
|
896 |
& anchor*
|
Patrick@291
|
897 |
& index*
|
Patrick@351
|
898 |
& image*
|
Patrick@351
|
899 |
& audio*
|
Patrick@351
|
900 |
& smil*
|
Coraline@436
|
901 |
& nowrap*
|
Patrick@293
|
902 |
|
patrick@75
|
903 |
& blank*
|
Patrick@293
|
904 |
}
|
Patrick@288
|
905 |
|
Coraline@409
|
906 |
blanks-m.inlines = mixed {
|
Coraline@409
|
907 |
sup*
|
Coraline@409
|
908 |
& sub*
|
Coraline@409
|
909 |
& var*
|
Coraline@409
|
910 |
& number*
|
Coraline@409
|
911 |
& acronym*
|
Coraline@409
|
912 |
& warning*
|
Coraline@409
|
913 |
|
Coraline@409
|
914 |
& highlight*
|
Coraline@409
|
915 |
& emphasis*
|
Coraline@409
|
916 |
& mentioned*
|
Coraline@409
|
917 |
& literal*
|
Coraline@409
|
918 |
& term*
|
Coraline@409
|
919 |
& stage*
|
Coraline@409
|
920 |
& name*
|
Coraline@409
|
921 |
& foreign*
|
Coraline@409
|
922 |
& date*
|
Coraline@409
|
923 |
& math*
|
Coraline@409
|
924 |
& quote*
|
Coraline@409
|
925 |
& initial*
|
Coraline@409
|
926 |
& note*
|
Coraline@409
|
927 |
& link*
|
Coraline@409
|
928 |
& anchor*
|
Coraline@409
|
929 |
& index*
|
Coraline@409
|
930 |
& image*
|
Coraline@409
|
931 |
& audio*
|
Coraline@409
|
932 |
& smil*
|
Coraline@436
|
933 |
& nowrap*
|
Coraline@409
|
934 |
|
Coraline@409
|
935 |
& blank-m*
|
Coraline@409
|
936 |
}
|
Coraline@409
|
937 |
|
Coraline@441
|
938 |
blanks-c.inlines = mixed {
|
Coraline@441
|
939 |
sup*
|
Coraline@441
|
940 |
& sub*
|
Coraline@441
|
941 |
& var*
|
Coraline@441
|
942 |
& number*
|
Coraline@441
|
943 |
& acronym*
|
Coraline@441
|
944 |
& warning*
|
Coraline@441
|
945 |
|
Coraline@441
|
946 |
& highlight*
|
Coraline@441
|
947 |
& emphasis*
|
Coraline@441
|
948 |
& mentioned*
|
Coraline@441
|
949 |
& literal*
|
Coraline@441
|
950 |
& term*
|
Coraline@441
|
951 |
& stage*
|
Coraline@441
|
952 |
& name*
|
Coraline@441
|
953 |
& foreign*
|
Coraline@441
|
954 |
& date*
|
Coraline@441
|
955 |
& math*
|
Coraline@441
|
956 |
& quote*
|
Coraline@441
|
957 |
& initial*
|
Coraline@441
|
958 |
& note*
|
Coraline@441
|
959 |
& link*
|
Coraline@441
|
960 |
& anchor*
|
Coraline@441
|
961 |
& index*
|
Coraline@441
|
962 |
& image*
|
Coraline@441
|
963 |
& audio*
|
Coraline@441
|
964 |
& smil*
|
Coraline@441
|
965 |
& nowrap*
|
Coraline@441
|
966 |
|
Coraline@441
|
967 |
& blank-c*
|
Coraline@441
|
968 |
}
|
Coraline@441
|
969 |
|
Coraline@442
|
970 |
correct.inlines = mixed {
|
Coraline@442
|
971 |
sup*
|
Coraline@442
|
972 |
& sub*
|
Coraline@442
|
973 |
& var*
|
Coraline@442
|
974 |
& number*
|
Coraline@442
|
975 |
& acronym*
|
Coraline@442
|
976 |
& warning*
|
Coraline@442
|
977 |
|
Coraline@442
|
978 |
& highlight*
|
Coraline@442
|
979 |
& emphasis*
|
Coraline@442
|
980 |
& mentioned*
|
Coraline@442
|
981 |
& literal*
|
Coraline@442
|
982 |
& term*
|
Coraline@442
|
983 |
& stage*
|
Coraline@442
|
984 |
& name*
|
Coraline@442
|
985 |
& foreign*
|
Coraline@442
|
986 |
& date*
|
Coraline@442
|
987 |
& math*
|
Coraline@442
|
988 |
& quote*
|
Coraline@442
|
989 |
& initial*
|
Coraline@442
|
990 |
& note*
|
Coraline@442
|
991 |
& link*
|
Coraline@442
|
992 |
& anchor*
|
Coraline@442
|
993 |
& index*
|
Coraline@442
|
994 |
& image*
|
Coraline@442
|
995 |
& audio*
|
Coraline@442
|
996 |
& smil*
|
Coraline@442
|
997 |
& nowrap*
|
Coraline@442
|
998 |
|
Coraline@442
|
999 |
& char*
|
Coraline@442
|
1000 |
}
|
Coraline@442
|
1001 |
|
Patrick@336
|
1002 |
pointing.inlines = mixed {
|
Patrick@293
|
1003 |
sup*
|
Patrick@293
|
1004 |
& sub*
|
Patrick@293
|
1005 |
& var*
|
Patrick@293
|
1006 |
& number*
|
Patrick@293
|
1007 |
& acronym*
|
Patrick@293
|
1008 |
& warning*
|
Patrick@293
|
1009 |
|
Patrick@291
|
1010 |
& highlight*
|
Patrick@291
|
1011 |
& emphasis*
|
Patrick@291
|
1012 |
& mentioned*
|
Patrick@350
|
1013 |
& literal*
|
Patrick@350
|
1014 |
& term*
|
Patrick@291
|
1015 |
& stage*
|
Patrick@350
|
1016 |
& name*
|
Patrick@350
|
1017 |
& foreign*
|
Patrick@350
|
1018 |
& date*
|
Patrick@350
|
1019 |
& math*
|
Patrick@351
|
1020 |
& quote*
|
Patrick@291
|
1021 |
& initial*
|
Patrick@291
|
1022 |
& note*
|
Patrick@291
|
1023 |
& link*
|
Patrick@291
|
1024 |
& anchor*
|
Patrick@291
|
1025 |
& index*
|
Patrick@351
|
1026 |
& image*
|
Patrick@351
|
1027 |
& audio*
|
Patrick@351
|
1028 |
& smil*
|
Coraline@436
|
1029 |
& nowrap*
|
Patrick@293
|
1030 |
|
Patrick@336
|
1031 |
& point*
|
Patrick@293
|
1032 |
}
|
patrick@75
|
1033 |
|
Coraline@441
|
1034 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m, blank-c ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
1035 |
|
patrick@73
|
1036 |
# ~~~~~~ blank
|
Patrick@216
|
1037 |
blank = element blank { blank.attributes, blank.content }
|
Patrick@216
|
1038 |
|
Patrick@216
|
1039 |
blank.attributes =
|
claire@381
|
1040 |
area.attribute?
|
claire@381
|
1041 |
& long.attribute?
|
claire@381
|
1042 |
area.attribute = attribute area { xsd:boolean }
|
patrick@73
|
1043 |
|
patrick@73
|
1044 |
blank.content =
|
patrick@73
|
1045 |
text
|
patrick@87
|
1046 |
| (s+, help?, answer?)
|
patrick@73
|
1047 |
|
Coraline@409
|
1048 |
# ~~~~~~ blank-m
|
Coraline@409
|
1049 |
blank-m = element blank { blank-m.content }
|
Patrick@411
|
1050 |
blank-m.content =
|
Patrick@411
|
1051 |
p
|
Patrick@411
|
1052 |
| math
|
Patrick@411
|
1053 |
| image
|
Patrick@411
|
1054 |
| audio
|
Patrick@411
|
1055 |
| (s-m+, help?, answer?)
|
Coraline@441
|
1056 |
|
Coraline@441
|
1057 |
# ~~~~~~ blank-c
|
Coraline@441
|
1058 |
blank-c = element blank { blank-c.attributes, blank-c.content }
|
Coraline@441
|
1059 |
|
Coraline@441
|
1060 |
blank-c.attributes = form.attribute?
|
Coraline@441
|
1061 |
form.attribute = attribute form { 'radio' | 'check' }
|
Coraline@441
|
1062 |
|
Coraline@441
|
1063 |
blank-c.content = (blank-c.right | blank-c.wrong)+, help?, answer?
|
Coraline@441
|
1064 |
blank-c.right = element right { inlines }
|
Coraline@441
|
1065 |
blank-c.wrong = element wrong { inlines }
|
Coraline@409
|
1066 |
|
patrick@73
|
1067 |
# ~~~~~~ s
|
patrick@73
|
1068 |
s = element s { s.content }
|
Coraline@409
|
1069 |
s.content = text
|
patrick@73
|
1070 |
|
Coraline@409
|
1071 |
# ~~~~~~ s-m
|
Coraline@409
|
1072 |
s-m = element s { s-m.content }
|
Patrick@411
|
1073 |
s-m.content =
|
Patrick@411
|
1074 |
p
|
Patrick@411
|
1075 |
| math
|
Patrick@411
|
1076 |
| image
|
Patrick@411
|
1077 |
| audio
|
Coraline@442
|
1078 |
|
Coraline@442
|
1079 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ char ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Coraline@442
|
1080 |
|
Coraline@442
|
1081 |
char = element char { char.attributes, char.content }
|
Coraline@442
|
1082 |
|
Coraline@442
|
1083 |
char.attributes = function.attribute?
|
Coraline@442
|
1084 |
function.attribute = attribute function { "accent" | "uppercase" }
|
Coraline@442
|
1085 |
|
Coraline@442
|
1086 |
char.content = text
|
patrick@73
|
1087 |
|
Patrick@336
|
1088 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
1089 |
|
Patrick@336
|
1090 |
point = element point { point.attributes, point.content }
|
patrick@73
|
1091 |
|
Patrick@336
|
1092 |
point.attributes =
|
Patrick@336
|
1093 |
point.ref.attribute?
|
Coraline@409
|
1094 |
|
Patrick@340
|
1095 |
point.ref.attribute = attribute ref {
|
Patrick@340
|
1096 |
"right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
|
Patrick@336
|
1097 |
|
Patrick@356
|
1098 |
point.content = inlines
|