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