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