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