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@353
|
13 |
front?,
|
patrick@84
|
14 |
(division | topic | quiz)+
|
patrick@73
|
15 |
}
|
patrick@73
|
16 |
|
patrick@75
|
17 |
|
patrick@73
|
18 |
publiquiz = element publiquiz {
|
patrick@73
|
19 |
publiquiz.attributes,
|
patrick@73
|
20 |
publiquiz.content
|
patrick@73
|
21 |
}
|
patrick@73
|
22 |
|
patrick@73
|
23 |
publiquiz.attributes =
|
patrick@73
|
24 |
version.attribute
|
patrick@73
|
25 |
|
patrick@73
|
26 |
publiquiz.content =
|
patrick@73
|
27 |
document
|
patrick@73
|
28 |
| top.quiz
|
patrick@73
|
29 |
|
patrick@73
|
30 |
|
patrick@73
|
31 |
# =============================================================================
|
patrick@73
|
32 |
# TOP LEVEL
|
patrick@73
|
33 |
# =============================================================================
|
patrick@73
|
34 |
|
Patrick@310
|
35 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
36 |
|
patrick@128
|
37 |
top.quiz = element quiz { top.quiz.attributes, top.quiz.content }
|
patrick@73
|
38 |
|
patrick@73
|
39 |
top.quiz.attributes =
|
Patrick@388
|
40 |
quiz.id.attribute?
|
Patrick@158
|
41 |
& quiz.type.attribute?
|
patrick@73
|
42 |
& lang.attribute?
|
patrick@117
|
43 |
quiz.id.attribute = attribute id { xsd:NMTOKEN }
|
Patrick@158
|
44 |
quiz.type.attribute = attribute type { xsd:NCName }
|
patrick@73
|
45 |
|
patrick@128
|
46 |
top.quiz.content =
|
patrick@128
|
47 |
top.head?,
|
claire@345
|
48 |
instructions?,
|
patrick@128
|
49 |
(engine | composite),
|
patrick@128
|
50 |
help?,
|
patrick@128
|
51 |
answer?
|
patrick@73
|
52 |
|
Patrick@310
|
53 |
|
patrick@73
|
54 |
# =============================================================================
|
Patrick@310
|
55 |
# COMPONENT LEVEL
|
patrick@73
|
56 |
# =============================================================================
|
patrick@73
|
57 |
|
patrick@73
|
58 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
59 |
|
patrick@73
|
60 |
quiz = element quiz { quiz.attributes, quiz.content }
|
patrick@73
|
61 |
|
patrick@73
|
62 |
quiz.attributes =
|
Patrick@310
|
63 |
(quiz.id.attribute | xmlid.attribute)?
|
Patrick@158
|
64 |
& quiz.type.attribute?
|
patrick@73
|
65 |
& lang.attribute?
|
patrick@73
|
66 |
|
patrick@73
|
67 |
quiz.content =
|
patrick@73
|
68 |
component.head?,
|
patrick@73
|
69 |
instructions,
|
patrick@87
|
70 |
(engine | composite),
|
patrick@73
|
71 |
help?,
|
patrick@87
|
72 |
answer?
|
patrick@73
|
73 |
|
patrick@73
|
74 |
|
patrick@73
|
75 |
# =============================================================================
|
patrick@73
|
76 |
# SECTION LEVEL
|
patrick@73
|
77 |
# =============================================================================
|
patrick@73
|
78 |
|
patrick@73
|
79 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
80 |
|
patrick@73
|
81 |
blanks.section = element section { section.attributes, blanks.section.content }
|
Patrick@336
|
82 |
pointing.section = element section {
|
Patrick@336
|
83 |
section.attributes, pointing.section.content }
|
patrick@73
|
84 |
|
patrick@73
|
85 |
blanks.section.content =
|
patrick@73
|
86 |
section.head?,
|
patrick@73
|
87 |
(blanks.section+ | blanks.block+)
|
Patrick@336
|
88 |
pointing.section.content =
|
patrick@73
|
89 |
section.head?,
|
Patrick@336
|
90 |
(pointing.section+ | pointing.block+)
|
patrick@73
|
91 |
|
patrick@73
|
92 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
93 |
|
patrick@73
|
94 |
instructions = element instructions { section.content }
|
patrick@73
|
95 |
|
patrick@73
|
96 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
97 |
|
patrick@73
|
98 |
engine =
|
patrick@87
|
99 |
choices-radio
|
patrick@87
|
100 |
| choices-check
|
patrick@87
|
101 |
| blanks-fill
|
patrick@87
|
102 |
| blanks-select
|
Patrick@216
|
103 |
| blanks-char
|
Patrick@336
|
104 |
| pointing
|
Patrick@336
|
105 |
| pointing-categories
|
patrick@73
|
106 |
| matching
|
patrick@73
|
107 |
| sort
|
patrick@125
|
108 |
| categories
|
Coraline@401
|
109 |
| mip
|
patrick@87
|
110 |
| production
|
patrick@73
|
111 |
|
patrick@73
|
112 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
113 |
|
patrick@87
|
114 |
choices-radio = element choices-radio {
|
Patrick@376
|
115 |
choices-radio.attributes, choices-radio.content }
|
patrick@87
|
116 |
choices-check = element choices-check {
|
Patrick@376
|
117 |
choices-check.attributes, choices-check.content }
|
patrick@73
|
118 |
|
Patrick@376
|
119 |
choices-radio.attributes =
|
patrick@73
|
120 |
shuffle.attribute?
|
Patrick@376
|
121 |
choices-check.attributes =
|
Patrick@376
|
122 |
success.attribute?
|
Patrick@376
|
123 |
& shuffle.attribute?
|
Patrick@376
|
124 |
success.attribute = attribute success { xsd:decimal {maxInclusive="1"} }
|
patrick@73
|
125 |
shuffle.attribute = attribute shuffle { xsd:boolean }
|
patrick@73
|
126 |
|
patrick@87
|
127 |
choices-radio.content =
|
patrick@73
|
128 |
choices.right
|
patrick@73
|
129 |
& choices.wrong+
|
patrick@87
|
130 |
choices-check.content =
|
patrick@73
|
131 |
(choices.right | choices.wrong)+
|
patrick@73
|
132 |
|
patrick@73
|
133 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
134 |
|
patrick@87
|
135 |
blanks-fill = element blanks-fill {
|
patrick@87
|
136 |
blanks-fill.attributes, blanks-fill.content }
|
patrick@87
|
137 |
blanks-select = element blanks-select {
|
patrick@87
|
138 |
blanks-select.attributes, blanks-select.content }
|
Coraline@402
|
139 |
blanks-char = element blanks-char {
|
Coraline@402
|
140 |
blanks-char.attributes, blanks-select.content }
|
patrick@73
|
141 |
|
patrick@87
|
142 |
blanks-fill.attributes =
|
Patrick@376
|
143 |
success.attribute?
|
Patrick@376
|
144 |
& strict.attribute?
|
claire@381
|
145 |
& long.attribute?
|
patrick@87
|
146 |
blanks-select.attributes =
|
Patrick@376
|
147 |
success.attribute?
|
Patrick@376
|
148 |
& multiple.attribute?
|
claire@380
|
149 |
& noshuffle.attribute?
|
patrick@73
|
150 |
strict.attribute = attribute strict { xsd:boolean }
|
patrick@73
|
151 |
multiple.attribute = attribute multiple { xsd:boolean }
|
claire@380
|
152 |
noshuffle.attribute = attribute no-shuffle { xsd:boolean }
|
claire@381
|
153 |
long.attribute = attribute long { xsd:positiveInteger }
|
patrick@73
|
154 |
|
patrick@87
|
155 |
blanks-fill.content =
|
patrick@73
|
156 |
(blanks.block+ | blanks.section+)
|
patrick@87
|
157 |
blanks-select.content =
|
Patrick@342
|
158 |
blanks.intruders?,
|
patrick@73
|
159 |
(blanks.block+ | blanks.section+)
|
patrick@73
|
160 |
|
Coraline@402
|
161 |
blanks-char.attributes =
|
Coraline@402
|
162 |
remove-space.attribute?
|
Coraline@402
|
163 |
remove-space.attribute = attribute remove-space { xsd:boolean }
|
Coraline@402
|
164 |
|
Patrick@336
|
165 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
166 |
|
Patrick@336
|
167 |
pointing = element pointing { pointing.attributes, pointing.content }
|
patrick@75
|
168 |
|
Patrick@336
|
169 |
pointing.attributes =
|
Patrick@376
|
170 |
success.attribute?
|
Patrick@376
|
171 |
& pointing.type.attribute?
|
Patrick@336
|
172 |
pointing.type.attribute = attribute type { "radio" | "check" }
|
patrick@73
|
173 |
|
Patrick@336
|
174 |
pointing.content =
|
Patrick@336
|
175 |
(pointing.section+ | pointing.block+)
|
Patrick@336
|
176 |
|
Patrick@336
|
177 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing-categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@336
|
178 |
|
Patrick@336
|
179 |
# ~~~~~~ pointing-categories
|
Patrick@376
|
180 |
pointing-categories = element pointing-categories {
|
Patrick@376
|
181 |
pointing-c.attributes, pointing-c.content }
|
Patrick@376
|
182 |
|
Patrick@376
|
183 |
pointing-c.attributes =
|
Patrick@376
|
184 |
success.attribute?
|
Patrick@336
|
185 |
|
Patrick@336
|
186 |
pointing-c.content =
|
Patrick@336
|
187 |
pointing-c.categories,
|
Patrick@336
|
188 |
pointing.section
|
Patrick@336
|
189 |
|
Patrick@336
|
190 |
# ~~~~~~ pointing-c.categories
|
Patrick@336
|
191 |
pointing-c.categories = element categories { pointing-c.categories.content }
|
Patrick@336
|
192 |
|
Patrick@336
|
193 |
pointing-c.categories.content =
|
Patrick@336
|
194 |
pointing-c.category1,
|
Patrick@336
|
195 |
pointing-c.category2,
|
Patrick@336
|
196 |
(pointing-c.category3,
|
Patrick@336
|
197 |
(pointing-c.category4, pointing-c.category5?)?)?
|
Patrick@336
|
198 |
|
Patrick@336
|
199 |
# ~~~~~~ pointing-c.categoryN
|
Patrick@336
|
200 |
pointing-c.category1 = element category {
|
Patrick@336
|
201 |
attribute id { "1" }, pointing-c.category.content }
|
Patrick@336
|
202 |
pointing-c.category2 = element category {
|
Patrick@336
|
203 |
attribute id { "2" }, pointing-c.category.content }
|
Patrick@336
|
204 |
pointing-c.category3 = element category {
|
Patrick@336
|
205 |
attribute id { "3" }, pointing-c.category.content }
|
Patrick@336
|
206 |
pointing-c.category4 = element category {
|
Patrick@336
|
207 |
attribute id { "4" }, pointing-c.category.content }
|
Patrick@336
|
208 |
pointing-c.category5 = element category {
|
Patrick@336
|
209 |
attribute id { "5" }, pointing-c.category.content }
|
Patrick@336
|
210 |
|
Patrick@336
|
211 |
pointing-c.category.content = inlines
|
Patrick@336
|
212 |
|
patrick@73
|
213 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
214 |
|
Patrick@161
|
215 |
# ~~~~~~ matching
|
Patrick@169
|
216 |
matching = element matching { matching.attributes, matching.content }
|
Patrick@169
|
217 |
|
Patrick@169
|
218 |
matching.attributes =
|
Patrick@376
|
219 |
success.attribute?
|
Patrick@376
|
220 |
& multiple.attribute?
|
patrick@75
|
221 |
|
patrick@73
|
222 |
matching.content =
|
Patrick@359
|
223 |
matching.intruders?,
|
patrick@73
|
224 |
match,
|
patrick@73
|
225 |
match+
|
patrick@73
|
226 |
|
Patrick@161
|
227 |
# ~~~~~~ match
|
Patrick@161
|
228 |
match = element match { match.content }
|
Patrick@161
|
229 |
|
Patrick@161
|
230 |
match.content =
|
Patrick@161
|
231 |
match.item,
|
Patrick@161
|
232 |
match.item
|
Patrick@161
|
233 |
|
patrick@73
|
234 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
235 |
|
patrick@73
|
236 |
sort = element sort { sort.attributes, sort.content }
|
patrick@73
|
237 |
|
patrick@73
|
238 |
sort.attributes =
|
Patrick@376
|
239 |
success.attribute?
|
Patrick@376
|
240 |
& shuffle.attribute?
|
patrick@75
|
241 |
|
patrick@73
|
242 |
sort.content =
|
patrick@73
|
243 |
comparison?,
|
patrick@73
|
244 |
sort.item,
|
patrick@73
|
245 |
sort.item+
|
patrick@73
|
246 |
|
patrick@125
|
247 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
248 |
|
Patrick@310
|
249 |
# ~~~~~~ category.head
|
Patrick@310
|
250 |
category.head = element head { category.head.content }
|
Patrick@310
|
251 |
|
Patrick@310
|
252 |
category.head.content =
|
Patrick@384
|
253 |
title
|
Patrick@384
|
254 |
& shorttitle?
|
Patrick@384
|
255 |
& subtitle*
|
Patrick@310
|
256 |
|
patrick@125
|
257 |
# ~~~~~~ categories
|
Patrick@168
|
258 |
categories = element categories { categories.attributes, categories.content }
|
patrick@125
|
259 |
|
Patrick@168
|
260 |
categories.attributes =
|
Patrick@376
|
261 |
success.attribute?
|
Patrick@376
|
262 |
& multiple.attribute?
|
claire@380
|
263 |
& noshuffle.attribute?
|
Patrick@310
|
264 |
|
patrick@125
|
265 |
categories.content =
|
Patrick@344
|
266 |
categories.intruders?,
|
patrick@125
|
267 |
category,
|
patrick@125
|
268 |
category+
|
patrick@125
|
269 |
|
patrick@125
|
270 |
# ~~~~~~ category
|
patrick@125
|
271 |
category = element category { category.content }
|
patrick@125
|
272 |
|
patrick@125
|
273 |
category.content =
|
patrick@125
|
274 |
category.head,
|
patrick@125
|
275 |
category.item*
|
patrick@125
|
276 |
|
Coraline@401
|
277 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@194
|
278 |
|
Coraline@401
|
279 |
mip = element mip { mip.attributes, mip.content }
|
patrick@194
|
280 |
|
Coraline@401
|
281 |
mip.attributes =
|
Patrick@376
|
282 |
success.attribute?
|
Patrick@376
|
283 |
& multiple.attribute?
|
patrick@194
|
284 |
|
Coraline@401
|
285 |
mip.content =
|
Coraline@401
|
286 |
mip.image
|
patrick@194
|
287 |
|
patrick@87
|
288 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@87
|
289 |
|
Coraline@407
|
290 |
production = element production { production.content }
|
Coraline@407
|
291 |
|
Coraline@407
|
292 |
production.content = text
|
patrick@87
|
293 |
|
patrick@73
|
294 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
295 |
|
patrick@77
|
296 |
# ~~~~~~ composite
|
Patrick@161
|
297 |
composite = element composite { composite.attributes, composite.content }
|
Patrick@161
|
298 |
|
Patrick@161
|
299 |
composite.attributes =
|
Patrick@376
|
300 |
success.attribute?
|
Patrick@376
|
301 |
& multipage.attribute?
|
Patrick@310
|
302 |
multipage.attribute = attribute multipage { xsd:boolean }
|
patrick@75
|
303 |
|
patrick@73
|
304 |
composite.content =
|
patrick@85
|
305 |
subquiz,
|
Patrick@154
|
306 |
subquiz+
|
patrick@77
|
307 |
|
patrick@85
|
308 |
# ~~~~~~ subquiz
|
patrick@85
|
309 |
subquiz = element subquiz { subquiz.content }
|
patrick@77
|
310 |
|
patrick@85
|
311 |
subquiz.content =
|
patrick@77
|
312 |
instructions?,
|
Patrick@141
|
313 |
engine,
|
Patrick@141
|
314 |
help?,
|
Patrick@141
|
315 |
answer?
|
patrick@73
|
316 |
|
patrick@73
|
317 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
318 |
|
patrick@73
|
319 |
help = element help { help.content }
|
patrick@73
|
320 |
|
patrick@73
|
321 |
help.content =
|
patrick@73
|
322 |
(section+ | block+)?,
|
patrick@73
|
323 |
link*
|
patrick@73
|
324 |
|
patrick@87
|
325 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
326 |
|
patrick@87
|
327 |
answer = element answer { answer.content }
|
patrick@73
|
328 |
|
patrick@87
|
329 |
answer.content =
|
patrick@81
|
330 |
(section+ | block+)?,
|
patrick@80
|
331 |
link*
|
patrick@73
|
332 |
|
patrick@73
|
333 |
|
patrick@73
|
334 |
# =============================================================================
|
patrick@73
|
335 |
# BLOCK LEVEL
|
patrick@73
|
336 |
# =============================================================================
|
patrick@73
|
337 |
|
patrick@73
|
338 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
339 |
|
Patrick@313
|
340 |
blanks.block = (
|
Patrick@313
|
341 |
blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
|
Patrick@313
|
342 |
| blanks.media)
|
Patrick@336
|
343 |
pointing.block = (
|
Patrick@336
|
344 |
pointing.p | pointing.list | pointing.blockquote | pointing.speech
|
Patrick@336
|
345 |
| pointing.table | media)
|
patrick@73
|
346 |
|
patrick@73
|
347 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
348 |
|
patrick@73
|
349 |
blanks.p = element p { blanks.p.content }
|
Patrick@336
|
350 |
pointing.p = element p { pointing.p.content }
|
patrick@73
|
351 |
|
patrick@73
|
352 |
blanks.p.content =
|
patrick@75
|
353 |
blanks.inlines
|
Patrick@336
|
354 |
pointing.p.content =
|
Patrick@336
|
355 |
pointing.inlines
|
patrick@73
|
356 |
|
patrick@73
|
357 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
358 |
|
patrick@73
|
359 |
# ~~~~~~ list
|
patrick@75
|
360 |
blanks.list = element list {
|
patrick@73
|
361 |
block.head?,
|
patrick@73
|
362 |
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
|
patrick@73
|
363 |
| (attribute type {"glossary"}, glossary.item+) )
|
patrick@75
|
364 |
}
|
Patrick@336
|
365 |
pointing.list = element list {
|
patrick@73
|
366 |
block.head?,
|
Patrick@336
|
367 |
( (attribute type {"ordered"}?, pointing.item, pointing.item+)
|
patrick@73
|
368 |
| (attribute type {"glossary"}, glossary.item+) )
|
patrick@75
|
369 |
}
|
patrick@73
|
370 |
|
patrick@73
|
371 |
# ~~~~~~ item
|
patrick@73
|
372 |
blanks.item = element item { blanks.item.content }
|
Patrick@336
|
373 |
pointing.item = element item { pointing.item.content }
|
patrick@73
|
374 |
|
patrick@73
|
375 |
blanks.item.content =
|
patrick@75
|
376 |
blanks.inlines
|
patrick@73
|
377 |
| blanks.block+
|
Patrick@336
|
378 |
pointing.item.content =
|
Patrick@336
|
379 |
pointing.inlines
|
Patrick@336
|
380 |
| pointing.block+
|
patrick@73
|
381 |
|
Patrick@313
|
382 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@313
|
383 |
|
Patrick@313
|
384 |
blanks.blockquote = element blockquote {
|
Patrick@313
|
385 |
blockquote.attributes, blanks.blockquote.content }
|
Patrick@336
|
386 |
pointing.blockquote = element blockquote {
|
Patrick@336
|
387 |
blockquote.attributes, pointing.blockquote.content }
|
Patrick@313
|
388 |
|
Patrick@313
|
389 |
blanks.blockquote.content =
|
Patrick@313
|
390 |
block.head?,
|
Patrick@313
|
391 |
(blanks.p | speech | blanks.list)+,
|
Patrick@313
|
392 |
attribution?
|
Patrick@336
|
393 |
pointing.blockquote.content =
|
Patrick@313
|
394 |
block.head?,
|
Patrick@336
|
395 |
(pointing.p | speech | pointing.list)+,
|
Patrick@313
|
396 |
attribution?
|
Patrick@313
|
397 |
|
Patrick@313
|
398 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@313
|
399 |
|
Patrick@313
|
400 |
# ~~~~~~ speech
|
Patrick@313
|
401 |
blanks.speech = element speech { blanks.speech.content }
|
Patrick@336
|
402 |
pointing.speech = element speech { pointing.speech.content }
|
Patrick@313
|
403 |
|
Patrick@313
|
404 |
blanks.speech.content =
|
Patrick@313
|
405 |
blanks.speaker?,
|
Patrick@313
|
406 |
stage?,
|
Patrick@313
|
407 |
(blanks.p | blanks.blockquote)+
|
Patrick@336
|
408 |
pointing.speech.content =
|
Patrick@336
|
409 |
pointing.speaker?,
|
Patrick@313
|
410 |
stage?,
|
Patrick@336
|
411 |
(pointing.p | pointing.blockquote)+
|
Patrick@313
|
412 |
|
Patrick@313
|
413 |
# ~~~~~~ speaker
|
Patrick@313
|
414 |
blanks.speaker = element speaker { blanks.speaker.content }
|
Patrick@336
|
415 |
pointing.speaker = element speaker { pointing.speaker.content }
|
Patrick@313
|
416 |
|
Patrick@313
|
417 |
blanks.speaker.content = blanks.inlines
|
Patrick@336
|
418 |
pointing.speaker.content = pointing.inlines
|
Patrick@313
|
419 |
|
patrick@73
|
420 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
421 |
|
Patrick@313
|
422 |
# ~~~~~~ table
|
patrick@249
|
423 |
blanks.table = element table { table.attributes, blanks.table.content }
|
Patrick@336
|
424 |
pointing.table = element table { table.attributes, pointing.table.content }
|
patrick@73
|
425 |
|
patrick@73
|
426 |
blanks.table.content =
|
patrick@73
|
427 |
block.head?,
|
Patrick@358
|
428 |
((thead?, blanks.tbody+) | blanks.tr+),
|
Patrick@313
|
429 |
blanks.table.caption?
|
Patrick@336
|
430 |
pointing.table.content =
|
patrick@73
|
431 |
block.head?,
|
Patrick@358
|
432 |
((thead?, pointing.tbody+) | pointing.tr+),
|
Patrick@336
|
433 |
pointing.table.caption?
|
patrick@73
|
434 |
|
patrick@73
|
435 |
# ~~~~~~ tbody
|
patrick@249
|
436 |
blanks.tbody = element tbody { blanks.tbody.content }
|
Patrick@336
|
437 |
pointing.tbody = element tbody { pointing.tbody.content }
|
patrick@73
|
438 |
|
patrick@73
|
439 |
blanks.tbody.content =
|
patrick@249
|
440 |
blanks.tr+
|
Patrick@336
|
441 |
pointing.tbody.content =
|
Patrick@336
|
442 |
pointing.tr+
|
patrick@73
|
443 |
|
patrick@249
|
444 |
# ~~~~~~ tr
|
patrick@249
|
445 |
blanks.tr = element tr { tr.attributes, blanks.tr.content }
|
Patrick@336
|
446 |
pointing.tr = element tr { tr.attributes, pointing.tr.content }
|
patrick@73
|
447 |
|
patrick@249
|
448 |
blanks.tr.content =
|
patrick@249
|
449 |
(blanks.td | blanks.th)+
|
Patrick@336
|
450 |
pointing.tr.content =
|
Patrick@336
|
451 |
(pointing.td | pointing.th)+
|
patrick@73
|
452 |
|
patrick@249
|
453 |
# ~~~~~~ td, th
|
patrick@249
|
454 |
blanks.td = element td { td.attributes, blanks.td.content }
|
patrick@249
|
455 |
blanks.th = element th { td.attributes, blanks.td.content }
|
Patrick@336
|
456 |
pointing.td = element td { td.attributes, pointing.td.content }
|
Patrick@336
|
457 |
pointing.th = element th { td.attributes, pointing.td.content }
|
patrick@73
|
458 |
|
patrick@249
|
459 |
blanks.td.content =
|
patrick@75
|
460 |
blanks.inlines
|
Patrick@313
|
461 |
| (blanks.p | blanks.media)+
|
Patrick@336
|
462 |
pointing.td.content =
|
Patrick@336
|
463 |
pointing.inlines
|
Patrick@336
|
464 |
| (pointing.p | media)+
|
Patrick@313
|
465 |
|
Patrick@313
|
466 |
# ~~~~~~ table.caption
|
Patrick@313
|
467 |
blanks.table.caption = element caption { blanks.caption.content }
|
Patrick@336
|
468 |
pointing.table.caption = element caption { pointing.caption.content }
|
Patrick@313
|
469 |
|
Patrick@313
|
470 |
blanks.caption.content =
|
Patrick@313
|
471 |
blanks.inlines
|
Patrick@313
|
472 |
| (blanks.p | speech | blanks.list | blockquote)+
|
Patrick@336
|
473 |
pointing.caption.content =
|
Patrick@336
|
474 |
pointing.inlines
|
Patrick@336
|
475 |
| (pointing.p | speech | pointing.list | blockquote)+
|
patrick@73
|
476 |
|
Patrick@174
|
477 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Patrick@174
|
478 |
|
Patrick@313
|
479 |
# ~~~~~~ media
|
Patrick@313
|
480 |
blanks.media = element media { media.attributes, blanks.media.content }
|
Patrick@336
|
481 |
pointing.media = element media { media.attributes, pointing.media.content }
|
Patrick@174
|
482 |
|
Patrick@313
|
483 |
blanks.media.content =
|
Patrick@174
|
484 |
block.head?,
|
Patrick@174
|
485 |
(blanks.image | audio | video)+,
|
Patrick@313
|
486 |
blanks.media.caption?,
|
Patrick@313
|
487 |
link?
|
Patrick@336
|
488 |
pointing.media.content =
|
Patrick@313
|
489 |
block.head?,
|
Patrick@313
|
490 |
(image | audio | video)+,
|
Patrick@336
|
491 |
pointing.media.caption?,
|
Patrick@174
|
492 |
link?
|
Patrick@174
|
493 |
|
Patrick@174
|
494 |
# ~~~~~~ blanks.image
|
Patrick@174
|
495 |
blanks.image = element image { image.attributes, blanks.image.content }
|
Coraline@401
|
496 |
mip.image = element image { image.attributes, mip.image.content }
|
Patrick@174
|
497 |
|
Patrick@174
|
498 |
blanks.image.content =
|
Patrick@174
|
499 |
copyright?,
|
Patrick@192
|
500 |
blanks.dropzone*
|
Coraline@401
|
501 |
mip.image.content =
|
Coraline@401
|
502 |
mip.dropzone+
|
Patrick@174
|
503 |
|
Patrick@313
|
504 |
# ~~~~~~ dropzone
|
Patrick@192
|
505 |
blanks.dropzone = element dropzone {
|
Patrick@192
|
506 |
blanks.dropzone.attributes, blanks.dropzone.content }
|
Coraline@401
|
507 |
mip.dropzone = element dropzone {
|
Coraline@401
|
508 |
mip.dropzone.attributes, mip.dropzone.content }
|
Patrick@183
|
509 |
|
Patrick@192
|
510 |
blanks.dropzone.attributes =
|
Patrick@183
|
511 |
x.attribute
|
Patrick@310
|
512 |
& y.attribute
|
Coraline@401
|
513 |
mip.dropzone.attributes =
|
patrick@194
|
514 |
x.attribute
|
patrick@194
|
515 |
& y.attribute
|
patrick@194
|
516 |
& w.attribute
|
patrick@194
|
517 |
& h.attribute
|
Patrick@174
|
518 |
|
Patrick@192
|
519 |
blanks.dropzone.content =
|
Patrick@183
|
520 |
blank
|
Coraline@401
|
521 |
mip.dropzone.content =
|
Coraline@401
|
522 |
image?,
|
Coraline@401
|
523 |
audio?
|
Patrick@174
|
524 |
|
Patrick@313
|
525 |
# ~~~~~~ media.caption
|
Patrick@313
|
526 |
blanks.media.caption = element caption {
|
Patrick@313
|
527 |
caption.attributes, blanks.caption.content }
|
Patrick@336
|
528 |
pointing.media.caption = element caption {
|
Patrick@336
|
529 |
caption.attributes, pointing.caption.content }
|
Patrick@313
|
530 |
|
patrick@73
|
531 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
532 |
|
patrick@73
|
533 |
choices.right = element right { choices.right.content }
|
patrick@73
|
534 |
choices.wrong = element wrong { choices.right.content }
|
patrick@73
|
535 |
|
patrick@73
|
536 |
choices.right.content =
|
patrick@73
|
537 |
inlines
|
Patrick@161
|
538 |
| ((p | image | (audio, image?) | video), help?, answer?)
|
patrick@73
|
539 |
|
Patrick@342
|
540 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
541 |
|
Patrick@342
|
542 |
blanks.intruders = element intruders { blanks.intruders.content }
|
patrick@73
|
543 |
|
Patrick@342
|
544 |
blanks.intruders.content =
|
Patrick@343
|
545 |
blank+
|
patrick@73
|
546 |
|
Patrick@359
|
547 |
# ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
548 |
|
Patrick@359
|
549 |
# ~~~~~~~ matching.intruders
|
Patrick@359
|
550 |
matching.intruders = element intruders { matching.intruders.content }
|
Patrick@359
|
551 |
|
Patrick@359
|
552 |
matching.intruders.content =
|
Patrick@359
|
553 |
match.item+
|
Patrick@359
|
554 |
|
Patrick@359
|
555 |
# ~~~~~~~ match.item
|
Patrick@161
|
556 |
match.item = element item { match.item.content }
|
patrick@73
|
557 |
|
Patrick@161
|
558 |
match.item.content =
|
Patrick@161
|
559 |
inlines
|
Patrick@341
|
560 |
| (p, help?, answer?)
|
patrick@73
|
561 |
|
Patrick@313
|
562 |
# ~~~~~~~~~~~~~~~~~~~~~~~~ comparison, sort.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
563 |
|
patrick@73
|
564 |
# ~~~~~~ comparison
|
patrick@73
|
565 |
comparison = element comparison { comparison.content }
|
patrick@73
|
566 |
|
patrick@73
|
567 |
comparison.content = inlines
|
patrick@73
|
568 |
|
patrick@73
|
569 |
# ~~~~~~ sort.item
|
patrick@73
|
570 |
sort.item = element item { sort.item.attributes, sort.item.content }
|
patrick@73
|
571 |
|
patrick@73
|
572 |
sort.item.attributes =
|
patrick@73
|
573 |
item.shuffle.attribute?
|
patrick@73
|
574 |
item.shuffle.attribute = attribute shuffle { xsd:integer }
|
patrick@73
|
575 |
|
Patrick@161
|
576 |
sort.item.content =
|
Patrick@161
|
577 |
inlines
|
Patrick@341
|
578 |
| (p, help?, answer?)
|
patrick@73
|
579 |
|
Patrick@344
|
580 |
# ~~~~~~~~~~~~~~~~~~~~~ categories.intruders, category.item ~~~~~~~~~~~~~~~~~~~
|
patrick@125
|
581 |
|
Patrick@344
|
582 |
# ~~~~~~ categories.intruders
|
Patrick@344
|
583 |
categories.intruders = element intruders { categories.intruders.content }
|
Patrick@342
|
584 |
|
Patrick@344
|
585 |
categories.intruders.content =
|
Patrick@342
|
586 |
category.item+
|
Patrick@342
|
587 |
|
Patrick@342
|
588 |
# ~~~~~~ category.item
|
patrick@125
|
589 |
category.item = element item { category.item.content }
|
patrick@125
|
590 |
|
Patrick@161
|
591 |
category.item.content =
|
Patrick@161
|
592 |
inlines
|
Patrick@341
|
593 |
| (p, help?, answer?)
|
patrick@125
|
594 |
|
patrick@73
|
595 |
|
patrick@73
|
596 |
# =============================================================================
|
patrick@73
|
597 |
# INLINE LEVEL
|
patrick@73
|
598 |
# =============================================================================
|
patrick@73
|
599 |
|
patrick@75
|
600 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@75
|
601 |
|
Patrick@293
|
602 |
blanks.inlines = mixed {
|
Patrick@293
|
603 |
sup*
|
Patrick@293
|
604 |
& sub*
|
Patrick@293
|
605 |
& var*
|
Patrick@293
|
606 |
& number*
|
Patrick@293
|
607 |
& acronym*
|
Patrick@293
|
608 |
& warning*
|
Patrick@293
|
609 |
|
Patrick@291
|
610 |
& highlight*
|
Patrick@291
|
611 |
& emphasis*
|
Patrick@291
|
612 |
& mentioned*
|
Patrick@350
|
613 |
& literal*
|
Patrick@350
|
614 |
& term*
|
Patrick@291
|
615 |
& stage*
|
Patrick@350
|
616 |
& name*
|
Patrick@350
|
617 |
& foreign*
|
Patrick@350
|
618 |
& date*
|
Patrick@350
|
619 |
& math*
|
Patrick@351
|
620 |
& quote*
|
Patrick@291
|
621 |
& initial*
|
Patrick@291
|
622 |
& note*
|
Patrick@291
|
623 |
& link*
|
Patrick@291
|
624 |
& anchor*
|
Patrick@291
|
625 |
& index*
|
Patrick@351
|
626 |
& image*
|
Patrick@351
|
627 |
& audio*
|
Patrick@351
|
628 |
& smil*
|
Patrick@293
|
629 |
|
patrick@75
|
630 |
& blank*
|
Patrick@293
|
631 |
}
|
Patrick@288
|
632 |
|
Patrick@336
|
633 |
pointing.inlines = mixed {
|
Patrick@293
|
634 |
sup*
|
Patrick@293
|
635 |
& sub*
|
Patrick@293
|
636 |
& var*
|
Patrick@293
|
637 |
& number*
|
Patrick@293
|
638 |
& acronym*
|
Patrick@293
|
639 |
& warning*
|
Patrick@293
|
640 |
|
Patrick@291
|
641 |
& highlight*
|
Patrick@291
|
642 |
& emphasis*
|
Patrick@291
|
643 |
& mentioned*
|
Patrick@350
|
644 |
& literal*
|
Patrick@350
|
645 |
& term*
|
Patrick@291
|
646 |
& stage*
|
Patrick@350
|
647 |
& name*
|
Patrick@350
|
648 |
& foreign*
|
Patrick@350
|
649 |
& date*
|
Patrick@350
|
650 |
& math*
|
Patrick@351
|
651 |
& quote*
|
Patrick@291
|
652 |
& initial*
|
Patrick@291
|
653 |
& note*
|
Patrick@291
|
654 |
& link*
|
Patrick@291
|
655 |
& anchor*
|
Patrick@291
|
656 |
& index*
|
Patrick@351
|
657 |
& image*
|
Patrick@351
|
658 |
& audio*
|
Patrick@351
|
659 |
& smil*
|
Patrick@293
|
660 |
|
Patrick@336
|
661 |
& point*
|
Patrick@293
|
662 |
}
|
patrick@75
|
663 |
|
patrick@73
|
664 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
665 |
|
patrick@73
|
666 |
# ~~~~~~ blank
|
Patrick@216
|
667 |
blank = element blank { blank.attributes, blank.content }
|
Patrick@216
|
668 |
|
Patrick@216
|
669 |
blank.attributes =
|
claire@381
|
670 |
area.attribute?
|
claire@381
|
671 |
& long.attribute?
|
claire@381
|
672 |
& function.attribute?
|
claire@381
|
673 |
area.attribute = attribute area { xsd:boolean }
|
Coraline@402
|
674 |
function.attribute = attribute function { 'accent' | 'uppercase' }
|
patrick@73
|
675 |
|
patrick@73
|
676 |
blank.content =
|
patrick@73
|
677 |
text
|
patrick@87
|
678 |
| (s+, help?, answer?)
|
patrick@73
|
679 |
|
patrick@73
|
680 |
# ~~~~~~ s
|
patrick@73
|
681 |
s = element s { s.content }
|
patrick@73
|
682 |
|
patrick@73
|
683 |
s.content = text
|
patrick@73
|
684 |
|
Patrick@336
|
685 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
patrick@73
|
686 |
|
Patrick@336
|
687 |
point = element point { point.attributes, point.content }
|
patrick@73
|
688 |
|
Patrick@336
|
689 |
point.attributes =
|
Patrick@336
|
690 |
point.ref.attribute?
|
Patrick@340
|
691 |
point.ref.attribute = attribute ref {
|
Patrick@340
|
692 |
"right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
|
Patrick@336
|
693 |
|
Patrick@356
|
694 |
point.content = inlines
|