RelaxNG/publiquiz.rnc
author Patrick PIERRE
mer., 19 juin 2013 10:10:42 +0200
changeset 220 ae88687dc7ff
parent 218 ebfe53d246b3
child 238 1e881598ecad
permissions -rw-r--r--
2 niveaux de sous-titre
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@84
    13
      (division | topic | quiz)+
patrick@73
    14
}
patrick@73
    15
patrick@75
    16
patrick@73
    17
publiquiz = element publiquiz {
patrick@73
    18
   publiquiz.attributes,
patrick@73
    19
   publiquiz.content
patrick@73
    20
}
patrick@73
    21
patrick@73
    22
publiquiz.attributes =
patrick@73
    23
   version.attribute
patrick@73
    24
patrick@73
    25
publiquiz.content =
patrick@73
    26
   document
patrick@73
    27
 | top.quiz
patrick@73
    28
patrick@73
    29
patrick@73
    30
# =============================================================================
patrick@73
    31
#                                  TOP LEVEL
patrick@73
    32
# =============================================================================
patrick@73
    33
patrick@73
    34
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
    35
patrick@128
    36
top.quiz = element quiz { top.quiz.attributes, top.quiz.content }
patrick@73
    37
patrick@73
    38
top.quiz.attributes =
patrick@73
    39
   quiz.id.attribute
Patrick@158
    40
 & quiz.type.attribute?
patrick@73
    41
 & lang.attribute?
patrick@117
    42
quiz.id.attribute = attribute id { xsd:NMTOKEN }
Patrick@158
    43
quiz.type.attribute = attribute type { xsd:NCName }
patrick@73
    44
patrick@128
    45
top.quiz.content =
patrick@128
    46
   top.head?,
patrick@128
    47
   instructions,
patrick@128
    48
   (engine | composite),
patrick@128
    49
   help?,
patrick@128
    50
   answer?
patrick@73
    51
patrick@73
    52
# =============================================================================
patrick@73
    53
#                               COMPONENT LEVEL
patrick@73
    54
# =============================================================================
patrick@73
    55
patrick@73
    56
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
    57
patrick@73
    58
quiz = element quiz { quiz.attributes, quiz.content }
patrick@73
    59
patrick@73
    60
quiz.attributes =
patrick@122
    61
   (quiz.id.attribute | quiz.xmlid.attribute)?
Patrick@158
    62
 & quiz.type.attribute?
patrick@73
    63
 & lang.attribute?
patrick@122
    64
quiz.xmlid.attribute = attribute xml:id { xsd:ID }
patrick@73
    65
patrick@73
    66
quiz.content =
patrick@73
    67
   component.head?,
patrick@73
    68
   instructions,
patrick@87
    69
   (engine | composite),
patrick@73
    70
   help?,
patrick@87
    71
   answer?
patrick@73
    72
patrick@73
    73
patrick@73
    74
# =============================================================================
patrick@73
    75
#                                 SECTION LEVEL
patrick@73
    76
# =============================================================================
patrick@73
    77
patrick@73
    78
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
    79
patrick@73
    80
blanks.section = element section { section.attributes, blanks.section.content }
patrick@73
    81
point.section = element section { section.attributes, point.section.content }
patrick@73
    82
patrick@73
    83
blanks.section.content =
patrick@73
    84
   section.head?,
patrick@73
    85
   (blanks.section+ | blanks.block+)
patrick@73
    86
point.section.content =
patrick@73
    87
   section.head?,
patrick@73
    88
   (point.section+ | point.block+)
patrick@73
    89
patrick@73
    90
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
    91
patrick@73
    92
instructions = element instructions { section.content }
patrick@73
    93
patrick@73
    94
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
    95
patrick@73
    96
engine =
patrick@87
    97
   choices-radio
patrick@87
    98
 | choices-check
patrick@87
    99
 | blanks-fill
patrick@87
   100
 | blanks-select
Patrick@216
   101
 | blanks-char
patrick@73
   102
 | point
patrick@73
   103
 | matching
patrick@73
   104
 | sort
patrick@125
   105
 | categories
patrick@194
   106
 | pip
patrick@87
   107
 | production
patrick@73
   108
patrick@73
   109
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   110
patrick@87
   111
choices-radio = element choices-radio {
patrick@87
   112
   choices.attributes, choices-radio.content }
patrick@87
   113
choices-check = element choices-check {
patrick@87
   114
   choices.attributes, choices-check.content }
patrick@73
   115
patrick@73
   116
choices.attributes =
patrick@73
   117
   shuffle.attribute?
patrick@73
   118
shuffle.attribute = attribute shuffle { xsd:boolean }
patrick@73
   119
patrick@87
   120
choices-radio.content =
patrick@73
   121
   choices.right
patrick@73
   122
 & choices.wrong+
patrick@87
   123
choices-check.content =
patrick@73
   124
   (choices.right | choices.wrong)+
patrick@73
   125
patrick@73
   126
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   127
patrick@87
   128
blanks-fill = element blanks-fill {
patrick@87
   129
   blanks-fill.attributes, blanks-fill.content }
patrick@87
   130
blanks-select = element blanks-select {
patrick@87
   131
   blanks-select.attributes, blanks-select.content }
Patrick@216
   132
blanks-char = element blanks-char { blanks-select.content }
patrick@73
   133
patrick@87
   134
blanks-fill.attributes =
patrick@75
   135
   strict.attribute?
patrick@87
   136
blanks-select.attributes =
patrick@73
   137
   multiple.attribute?
patrick@73
   138
strict.attribute = attribute strict { xsd:boolean }
patrick@73
   139
multiple.attribute = attribute multiple { xsd:boolean }
patrick@73
   140
patrick@87
   141
blanks-fill.content =
patrick@73
   142
   (blanks.block+ | blanks.section+)
patrick@87
   143
blanks-select.content =
patrick@73
   144
   blanks.wrongs?,
patrick@73
   145
   (blanks.block+ | blanks.section+)
patrick@73
   146
patrick@73
   147
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   148
patrick@73
   149
point = element point { point.attributes, point.content }
patrick@75
   150
patrick@73
   151
point.attributes =
patrick@73
   152
   point.type.attribute?
patrick@73
   153
point.type.attribute = attribute type {
patrick@73
   154
   "radio" | "radio_button" | "check" | "check_button" }
patrick@73
   155
patrick@73
   156
point.content =
patrick@73
   157
   (point.section+ | point.block+)
patrick@73
   158
patrick@73
   159
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   160
Patrick@161
   161
# ~~~~~~ matching
Patrick@169
   162
matching = element matching { matching.attributes, matching.content }
Patrick@169
   163
Patrick@169
   164
matching.attributes =
Patrick@169
   165
   multiple.attribute?
patrick@75
   166
patrick@73
   167
matching.content =
patrick@73
   168
   match,
patrick@73
   169
   match+
patrick@73
   170
Patrick@161
   171
# ~~~~~~ match
Patrick@161
   172
match = element match { match.content }
Patrick@161
   173
Patrick@161
   174
match.content =
Patrick@161
   175
   match.item,
Patrick@161
   176
   match.item
Patrick@161
   177
patrick@73
   178
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   179
patrick@73
   180
sort = element sort { sort.attributes, sort.content }
patrick@73
   181
patrick@73
   182
sort.attributes =
patrick@73
   183
   shuffle.attribute?
patrick@75
   184
patrick@73
   185
sort.content =
patrick@73
   186
   comparison?,
patrick@73
   187
   sort.item,
patrick@73
   188
   sort.item+
patrick@73
   189
patrick@125
   190
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@125
   191
patrick@125
   192
# ~~~~~~ categories
Patrick@168
   193
categories = element categories { categories.attributes, categories.content }
patrick@125
   194
Patrick@168
   195
categories.attributes =
Patrick@168
   196
   multiple.attribute?
Patrick@168
   197
   
patrick@125
   198
categories.content =
Patrick@174
   199
   category.item*,
patrick@125
   200
   category,
patrick@125
   201
   category+
patrick@125
   202
patrick@125
   203
# ~~~~~~ category
patrick@125
   204
category = element category { category.content }
patrick@125
   205
patrick@125
   206
category.content =
patrick@125
   207
   category.head,
patrick@125
   208
   category.item*
patrick@125
   209
   
patrick@125
   210
# ~~~~~~ category.head
patrick@125
   211
category.head = element head { category.head.content }
patrick@125
   212
patrick@125
   213
category.head.content =
patrick@125
   214
   title,
patrick@127
   215
   shorttitle?,
Patrick@218
   216
   subtitle*
patrick@125
   217
patrick@194
   218
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@194
   219
patrick@194
   220
pip = element pip { pip.attributes, pip.content }
patrick@194
   221
patrick@194
   222
pip.attributes =
patrick@194
   223
   multiple.attribute?
patrick@194
   224
patrick@194
   225
pip.content =
patrick@194
   226
   pip.image
patrick@194
   227
patrick@87
   228
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@87
   229
patrick@87
   230
production = element production { empty }
patrick@87
   231
patrick@73
   232
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   233
patrick@77
   234
# ~~~~~~ composite
Patrick@161
   235
composite = element composite { composite.attributes, composite.content }
Patrick@161
   236
Patrick@161
   237
composite.attributes =
Patrick@161
   238
   multipage.attribute?
Patrick@161
   239
multipage.attribute = attribute multipage { xsd:boolean } 
patrick@75
   240
patrick@73
   241
composite.content =
patrick@85
   242
   subquiz,
Patrick@154
   243
   subquiz+
patrick@77
   244
patrick@85
   245
# ~~~~~~ subquiz
patrick@85
   246
subquiz = element subquiz { subquiz.content }
patrick@77
   247
patrick@85
   248
subquiz.content =
patrick@77
   249
   instructions?,
Patrick@141
   250
   engine,
Patrick@141
   251
   help?,
Patrick@141
   252
   answer?
patrick@73
   253
patrick@73
   254
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   255
patrick@73
   256
help = element help { help.content }
patrick@73
   257
patrick@73
   258
help.content =
patrick@73
   259
   (section+ | block+)?,
patrick@73
   260
   link*
patrick@73
   261
patrick@87
   262
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   263
patrick@87
   264
answer = element answer { answer.content }
patrick@73
   265
patrick@87
   266
answer.content =
patrick@81
   267
   (section+ | block+)?,
patrick@80
   268
   link*
patrick@73
   269
patrick@73
   270
patrick@73
   271
# =============================================================================
patrick@73
   272
#                                 BLOCK LEVEL
patrick@73
   273
# =============================================================================
patrick@73
   274
patrick@73
   275
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   276
patrick@73
   277
blanks.block =
Patrick@174
   278
   (blanks.p | speech | blanks.list | blockquote | blanks.table | blanks.media)
patrick@73
   279
point.block =
patrick@73
   280
   (point.p | speech | point.list | blockquote | point.table | media)
patrick@73
   281
patrick@73
   282
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   283
patrick@73
   284
blanks.p = element p { blanks.p.content }
patrick@73
   285
point.p = element p { point.p.content }
patrick@73
   286
patrick@73
   287
blanks.p.content =
patrick@75
   288
   blanks.inlines
patrick@73
   289
point.p.content =
patrick@75
   290
   point.inlines
patrick@73
   291
patrick@73
   292
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   293
patrick@73
   294
# ~~~~~~ list
patrick@75
   295
blanks.list = element list {
patrick@73
   296
   block.head?,
patrick@73
   297
   (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
patrick@73
   298
    | (attribute type {"glossary"}, glossary.item+) )
patrick@75
   299
}
patrick@75
   300
point.list = element list {
patrick@73
   301
   block.head?,
patrick@73
   302
   (  (attribute type {"ordered"}?, point.item, point.item+)
patrick@73
   303
    | (attribute type {"glossary"}, glossary.item+) )
patrick@75
   304
}
patrick@73
   305
patrick@73
   306
# ~~~~~~ item
patrick@73
   307
blanks.item = element item { blanks.item.content }
patrick@73
   308
point.item = element item { point.item.content }
patrick@73
   309
patrick@73
   310
blanks.item.content =
patrick@75
   311
   blanks.inlines
patrick@73
   312
 | blanks.block+
patrick@73
   313
point.item.content =
patrick@75
   314
   point.inlines
patrick@73
   315
 | point.block+
patrick@73
   316
patrick@73
   317
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   318
patrick@73
   319
blanks.table = element table { blanks.table.content }
patrick@73
   320
point.table = element table { point.table.content }
patrick@73
   321
patrick@73
   322
blanks.table.content =
patrick@73
   323
   block.head?,
patrick@73
   324
   blanks.tgroup+,
patrick@111
   325
   table.caption?
patrick@73
   326
point.table.content =
patrick@73
   327
   block.head?,
patrick@73
   328
   point.tgroup+,
patrick@111
   329
   table.caption?
patrick@73
   330
patrick@73
   331
# ~~~~~~ tgroup
patrick@73
   332
blanks.tgroup = element tgroup { tgroup.attributes, blanks.tgroup.content }
patrick@73
   333
point.tgroup = element tgroup { tgroup.attributes, point.tgroup.content }
patrick@73
   334
patrick@73
   335
blanks.tgroup.content =
patrick@73
   336
   thead?,
patrick@73
   337
   blanks.tbody
patrick@73
   338
point.tgroup.content =
patrick@73
   339
   thead?,
patrick@73
   340
   point.tbody
patrick@73
   341
patrick@73
   342
# ~~~~~~ tbody
patrick@73
   343
blanks.tbody = element tbody { tbody.attributes, blanks.tbody.content }
patrick@73
   344
point.tbody = element tbody { tbody.attributes, point.tbody.content }
patrick@73
   345
patrick@73
   346
blanks.tbody.content =
patrick@73
   347
   blanks.row+
patrick@73
   348
point.tbody.content =
patrick@73
   349
   point.row+
patrick@73
   350
patrick@73
   351
# ~~~~~~ row
patrick@148
   352
blanks.row = element row { row.attributes, blanks.row.content }
patrick@148
   353
point.row = element row { row.attributes, point.row.content }
patrick@73
   354
patrick@73
   355
blanks.row.content =
patrick@73
   356
  blanks.entry+
patrick@73
   357
point.row.content =
patrick@73
   358
  point.entry+
patrick@73
   359
patrick@73
   360
# ~~~~~~ entry
patrick@73
   361
blanks.entry = element entry { blanks.entry.content }
patrick@73
   362
point.entry = element entry { point.entry.content }
patrick@73
   363
patrick@73
   364
blanks.entry.content =
patrick@75
   365
   blanks.inlines
patrick@73
   366
 | (p | media)+
patrick@73
   367
patrick@73
   368
point.entry.content =
patrick@75
   369
   point.inlines
patrick@73
   370
 | (p | media)+
patrick@73
   371
Patrick@174
   372
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@174
   373
Patrick@174
   374
# ~~~~~~ blanks.media
Patrick@174
   375
blanks.media = element media { blanksmedia.content }
Patrick@174
   376
Patrick@174
   377
blanksmedia.content =
Patrick@174
   378
   block.head?,
Patrick@174
   379
   (blanks.image | audio | video)+,
Patrick@174
   380
   media.caption?,
Patrick@174
   381
   link?
Patrick@174
   382
Patrick@174
   383
# ~~~~~~ blanks.image
Patrick@174
   384
blanks.image = element image { image.attributes, blanks.image.content }
patrick@194
   385
pip.image = element image { image.attributes, pip.image.content }
Patrick@174
   386
Patrick@174
   387
blanks.image.content =
Patrick@174
   388
   copyright?,
Patrick@192
   389
   blanks.dropzone*
patrick@194
   390
pip.image.content =
patrick@194
   391
   pip.dropzone+
Patrick@174
   392
patrick@194
   393
# ~~~~~~dropzone
Patrick@192
   394
blanks.dropzone = element dropzone {
Patrick@192
   395
   blanks.dropzone.attributes, blanks.dropzone.content }
patrick@194
   396
pip.dropzone = element dropzone {
patrick@194
   397
   pip.dropzone.attributes, pip.dropzone.content }
Patrick@183
   398
Patrick@192
   399
blanks.dropzone.attributes =
Patrick@183
   400
   x.attribute
Patrick@183
   401
 & y.attribute   
patrick@194
   402
pip.dropzone.attributes =
patrick@194
   403
   x.attribute
patrick@194
   404
 & y.attribute
patrick@194
   405
 & w.attribute
patrick@194
   406
 & h.attribute
Patrick@174
   407
Patrick@192
   408
blanks.dropzone.content =
Patrick@183
   409
   blank
patrick@194
   410
pip.dropzone.content =
patrick@194
   411
   image?
Patrick@174
   412
patrick@73
   413
# ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   414
patrick@73
   415
choices.right = element right { choices.right.content }
patrick@73
   416
choices.wrong = element wrong { choices.right.content }
patrick@73
   417
patrick@73
   418
choices.right.content =
patrick@73
   419
   inlines
Patrick@161
   420
 | ((p | image | (audio, image?) | video), help?, answer?)
patrick@73
   421
patrick@73
   422
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   423
patrick@73
   424
# ~~~~~~ blanks.wrongs
patrick@73
   425
blanks.wrongs = element wrongs { blanks.wrongs.content }
patrick@73
   426
patrick@73
   427
blanks.wrongs.content =
patrick@73
   428
   blanks.wrong+
patrick@73
   429
patrick@73
   430
# ~~~~~~ blanks.wrong
patrick@73
   431
blanks.wrong = element wrong { blanks.wrong.content }
patrick@73
   432
patrick@73
   433
blanks.wrong.content = text
patrick@73
   434
Patrick@161
   435
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   436
Patrick@161
   437
match.item = element item { match.item.content }
patrick@73
   438
Patrick@161
   439
match.item.content =
Patrick@161
   440
   inlines
patrick@166
   441
 | ((p | image | (audio, image?) | video), help?, answer?)
patrick@73
   442
patrick@75
   443
# ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   444
patrick@73
   445
# ~~~~~~ comparison
patrick@73
   446
comparison = element comparison { comparison.content }
patrick@73
   447
patrick@73
   448
comparison.content = inlines
patrick@73
   449
patrick@73
   450
# ~~~~~~ sort.item
patrick@73
   451
sort.item = element item { sort.item.attributes, sort.item.content }
patrick@73
   452
patrick@73
   453
sort.item.attributes =
patrick@73
   454
   item.shuffle.attribute?
patrick@73
   455
item.shuffle.attribute = attribute shuffle { xsd:integer }
patrick@73
   456
Patrick@161
   457
sort.item.content =
Patrick@161
   458
   inlines
patrick@166
   459
 | ((p | image | (audio, image?) | video), help?, answer?)
patrick@73
   460
patrick@125
   461
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@125
   462
patrick@125
   463
category.item = element item { category.item.content }
patrick@125
   464
Patrick@161
   465
category.item.content =
Patrick@161
   466
   inlines
patrick@166
   467
 | ((p | image | (audio, image?) | video), help?, answer?)
patrick@125
   468
patrick@73
   469
patrick@73
   470
# =============================================================================
patrick@73
   471
#                                 INLINE LEVEL
patrick@73
   472
# =============================================================================
patrick@73
   473
patrick@75
   474
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@75
   475
patrick@75
   476
blanks.inlines = mixed {
patrick@75
   477
   sup*
patrick@75
   478
 & sub*
patrick@75
   479
 & var*
patrick@75
   480
 & number*
patrick@75
   481
 & math*
patrick@75
   482
 & date*
patrick@75
   483
 & name*
patrick@75
   484
 & note*
patrick@75
   485
 & foreign*
patrick@75
   486
 & highlight*
patrick@75
   487
 & mentioned*
patrick@75
   488
 & quote*
patrick@75
   489
 & acronym*
patrick@75
   490
 & term*
patrick@75
   491
 & link*
patrick@75
   492
 & anchor*
Patrick@174
   493
 & image*
Patrick@209
   494
 & audio*
patrick@75
   495
 & blank*
patrick@75
   496
}
patrick@75
   497
point.inlines = mixed {
patrick@75
   498
   sup*
patrick@75
   499
 & sub*
patrick@75
   500
 & var*
patrick@75
   501
 & number*
patrick@75
   502
 & math*
patrick@75
   503
 & date*
patrick@75
   504
 & name*
patrick@75
   505
 & note*
patrick@75
   506
 & foreign*
patrick@75
   507
 & highlight*
patrick@75
   508
 & mentioned*
patrick@75
   509
 & quote*
patrick@75
   510
 & acronym*
patrick@75
   511
 & term*
patrick@75
   512
 & link*
patrick@75
   513
 & anchor*
Patrick@174
   514
 & image*
Patrick@209
   515
 & audio*
patrick@75
   516
 & blank*
patrick@75
   517
 & point.right*
patrick@75
   518
 & point.wrong*
patrick@75
   519
}
patrick@75
   520
patrick@73
   521
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   522
patrick@73
   523
# ~~~~~~ blank
Patrick@216
   524
blank = element blank { blank.attributes, blank.content }
Patrick@216
   525
Patrick@216
   526
blank.attributes =
Patrick@216
   527
   function.attribute?
Patrick@216
   528
function.attribute = attribute function { 'lowercase' | 'uppercase' }
patrick@73
   529
patrick@73
   530
blank.content =
patrick@73
   531
   text
patrick@87
   532
 | (s+, help?, answer?)
patrick@73
   533
patrick@73
   534
# ~~~~~~ s
patrick@73
   535
s = element s { s.content }
patrick@73
   536
patrick@73
   537
s.content = text
patrick@73
   538
patrick@73
   539
# ~~~~~~~~~~~~~~~~~~~~~~~~~ point.right, point.wrong ~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@73
   540
patrick@73
   541
point.right = element right { point.right.content }
patrick@73
   542
point.wrong = element wrong { point.right.content }
patrick@73
   543
patrick@73
   544
point.right.content = inlines