RelaxNG/publiquiz.rnc
changeset 414 a90d62ed3016
parent 412 c70e17e21021
child 417 5bb0c5a94bf3
equal deleted inserted replaced
413:562ba8e81a86 414:a90d62ed3016
    77 # =============================================================================
    77 # =============================================================================
    78 
    78 
    79 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    79 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    80 
    80 
    81 blanks.section = element section { section.attributes, blanks.section.content }
    81 blanks.section = element section { section.attributes, blanks.section.content }
       
    82 blanks-m.section = element section {
       
    83    section.attributes, blanks-m.section.content }
    82 pointing.section = element section {
    84 pointing.section = element section {
    83    section.attributes, pointing.section.content }
    85    section.attributes, pointing.section.content }
    84 
    86 
    85 blanks.section.content =
    87 blanks.section.content =
    86    section.head?,
    88    section.head?,
    87    (blanks.section+ | blanks.block+)
    89    (blanks.section+ | blanks.block+)
       
    90 blanks-m.section.content =
       
    91    section.head?,
       
    92    (blanks-m.section+ | blanks-m.block+)
    88 pointing.section.content =
    93 pointing.section.content =
    89    section.head?,
    94    section.head?,
    90    (pointing.section+ | pointing.block+)
    95    (pointing.section+ | pointing.block+)
    91 
    96 
    92 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    97 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98 engine =
   103 engine =
    99    choices-radio
   104    choices-radio
   100  | choices-check
   105  | choices-check
   101  | blanks-fill
   106  | blanks-fill
   102  | blanks-select
   107  | blanks-select
       
   108  | blanks-media
   103  | blanks-char
   109  | blanks-char
   104  | pointing
   110  | pointing
   105  | pointing-categories
   111  | pointing-categories
       
   112  | pip
   106  | matching
   113  | matching
   107  | sort
   114  | sort
   108  | categories
   115  | categories
   109  | mip
       
   110  | production
   116  | production
   111 
   117 
   112 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   118 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   113 
   119 
   114 choices-radio = element choices-radio {
   120 choices-radio = element choices-radio {
   134 
   140 
   135 blanks-fill = element blanks-fill {
   141 blanks-fill = element blanks-fill {
   136    blanks-fill.attributes, blanks-fill.content }
   142    blanks-fill.attributes, blanks-fill.content }
   137 blanks-select = element blanks-select {
   143 blanks-select = element blanks-select {
   138    blanks-select.attributes, blanks-select.content }
   144    blanks-select.attributes, blanks-select.content }
   139 blanks-char = element blanks-char { 
   145 blanks-media = element blanks-media {
       
   146    blanks-select.attributes, blanks-media.content }
       
   147 blanks-char = element blanks-char {
   140    blanks-char.attributes, blanks-select.content }
   148    blanks-char.attributes, blanks-select.content }
   141 
   149 
   142 blanks-fill.attributes =
   150 blanks-fill.attributes =
   143    success.attribute?
   151    success.attribute?
   144  & strict.attribute?
   152  & strict.attribute?
   145  & long.attribute?
   153  & long.attribute?
   146 blanks-select.attributes =
   154 blanks-select.attributes =
   147    success.attribute?
   155    success.attribute?
   148  & multiple.attribute?
   156  & multiple.attribute?
   149  & noshuffle.attribute?
   157  & noshuffle.attribute?
       
   158  & orientation.attribute?
   150 strict.attribute = attribute strict { xsd:boolean }
   159 strict.attribute = attribute strict { xsd:boolean }
   151 multiple.attribute = attribute multiple { xsd:boolean }
   160 multiple.attribute = attribute multiple { xsd:boolean }
   152 noshuffle.attribute = attribute no-shuffle { xsd:boolean }
   161 noshuffle.attribute = attribute no-shuffle { xsd:boolean }
   153 long.attribute = attribute long { xsd:positiveInteger }
   162 long.attribute = attribute long { xsd:positiveInteger }
       
   163 orientation.attribute = attribute orientation {"north"|"east"|"west"|"south"}
   154 
   164 
   155 blanks-fill.content =
   165 blanks-fill.content =
   156    (blanks.block+ | blanks.section+)
   166    (blanks.block+ | blanks.section+)
   157 blanks-select.content =
   167 blanks-select.content =
   158    blanks.intruders?,
   168    blanks.intruders?,
   159    (blanks.block+ | blanks.section+)
   169    (blanks.block+ | blanks.section+)
       
   170 blanks-media.content =
       
   171    blanks-m.intruders?,
       
   172    (blanks-m.block+ | blanks-m.section+)
   160 
   173 
   161 blanks-char.attributes =
   174 blanks-char.attributes =
   162    remove-space.attribute?
   175    remove-space.attribute?
   163 remove-space.attribute = attribute remove-space { xsd:boolean }
   176 remove-space.attribute = attribute remove-space { xsd:boolean }
   164 
   177 
   208 pointing-c.category5 = element category {
   221 pointing-c.category5 = element category {
   209    attribute id { "5" }, pointing-c.category.content }
   222    attribute id { "5" }, pointing-c.category.content }
   210 
   223 
   211 pointing-c.category.content = inlines
   224 pointing-c.category.content = inlines
   212 
   225 
       
   226 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   227 
       
   228 pip = element pip { pip.content }
       
   229 
       
   230 pip.content =
       
   231    pip.image
       
   232 
       
   233 pip.image = element image { image.attributes, pip.image.content }
       
   234 pip.image.content =
       
   235    pip.point+
       
   236 
   213 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   237 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   214 
   238 
   215 # ~~~~~~ matching
   239 # ~~~~~~ matching
   216 matching = element matching { matching.attributes, matching.content }
   240 matching = element matching { matching.attributes, matching.content }
   217 
   241 
   218 matching.attributes =
   242 matching.attributes =
   219    success.attribute?
   243    success.attribute?
   220  & multiple.attribute?
   244  & multiple.attribute?
       
   245  & orientation.attribute?
   221 
   246 
   222 matching.content =
   247 matching.content =
   223    matching.intruders?,
   248    matching.intruders?,
   224    match,
   249    match,
   225    match+
   250    match+
   236 sort = element sort { sort.attributes, sort.content }
   261 sort = element sort { sort.attributes, sort.content }
   237 
   262 
   238 sort.attributes =
   263 sort.attributes =
   239    success.attribute?
   264    success.attribute?
   240  & shuffle.attribute?
   265  & shuffle.attribute?
       
   266  & orientation.attribute?
   241 
   267 
   242 sort.content =
   268 sort.content =
   243    comparison?,
   269    comparison?,
   244    sort.item,
   270    sort.item,
   245    sort.item+
   271    sort.item+
   259 
   285 
   260 categories.attributes =
   286 categories.attributes =
   261    success.attribute?
   287    success.attribute?
   262  & multiple.attribute?
   288  & multiple.attribute?
   263  & noshuffle.attribute?
   289  & noshuffle.attribute?
       
   290  & orientation.attribute?
   264 
   291 
   265 categories.content =
   292 categories.content =
   266    categories.intruders?,
   293    categories.intruders?,
   267    category,
   294    category,
   268    category+
   295    category+
   271 category = element category { category.content }
   298 category = element category { category.content }
   272 
   299 
   273 category.content =
   300 category.content =
   274    category.head,
   301    category.head,
   275    category.item*
   302    category.item*
   276 
       
   277 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   278 
       
   279 mip = element mip { mip.attributes, mip.content }
       
   280 
       
   281 mip.attributes =
       
   282    success.attribute?
       
   283  & multiple.attribute?
       
   284 
       
   285 mip.content =
       
   286    mip.image
       
   287 
   303 
   288 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   304 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   289 
   305 
   290 production = element production { production.content }
   306 production = element production { production.content }
   291 
   307 
   338 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   354 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   339 
   355 
   340 blanks.block = (
   356 blanks.block = (
   341    blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
   357    blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
   342  | blanks.media)
   358  | blanks.media)
       
   359 blanks-m.block = (
       
   360    blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
       
   361  | blanks-m.table | blanks-m.media)
   343 pointing.block = (
   362 pointing.block = (
   344    pointing.p | pointing.list | pointing.blockquote | pointing.speech
   363    pointing.p | pointing.list | pointing.blockquote | pointing.speech
   345  | pointing.table | media)
   364  | pointing.table | media)
   346 
   365 
   347 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   366 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   348 
   367 
   349 blanks.p = element p { blanks.p.content }
   368 blanks.p = element p { blanks.p.content }
       
   369 blanks-m.p = element p { blanks-m.p.content }
   350 pointing.p = element p { pointing.p.content }
   370 pointing.p = element p { pointing.p.content }
   351 
   371 
   352 blanks.p.content =
   372 blanks.p.content =
   353    blanks.inlines
   373    blanks.inlines
       
   374 blanks-m.p.content =
       
   375    blanks-m.inlines
   354 pointing.p.content =
   376 pointing.p.content =
   355    pointing.inlines
   377    pointing.inlines
   356 
   378 
   357 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   379 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   358 
   380 
   359 # ~~~~~~ list
   381 # ~~~~~~ list
   360 blanks.list = element list {
   382 blanks.list = element list {
       
   383    block.head?,
       
   384    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
       
   385     | (attribute type {"glossary"}, glossary.item+) )
       
   386 }
       
   387 blanks-m.list = element list {
   361    block.head?,
   388    block.head?,
   362    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   389    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   363     | (attribute type {"glossary"}, glossary.item+) )
   390     | (attribute type {"glossary"}, glossary.item+) )
   364 }
   391 }
   365 pointing.list = element list {
   392 pointing.list = element list {
   368     | (attribute type {"glossary"}, glossary.item+) )
   395     | (attribute type {"glossary"}, glossary.item+) )
   369 }
   396 }
   370 
   397 
   371 # ~~~~~~ item
   398 # ~~~~~~ item
   372 blanks.item = element item { blanks.item.content }
   399 blanks.item = element item { blanks.item.content }
       
   400 blanks-m.item = element item { blanks.item.content }
   373 pointing.item = element item { pointing.item.content }
   401 pointing.item = element item { pointing.item.content }
   374 
   402 
   375 blanks.item.content =
   403 blanks.item.content =
   376    blanks.inlines
   404    blanks.inlines
   377  | blanks.block+
   405  | blanks.block+
       
   406 blanks-m.item.content =
       
   407    blanks-m.inlines
       
   408  | blanks-m.block+
   378 pointing.item.content =
   409 pointing.item.content =
   379    pointing.inlines
   410    pointing.inlines
   380  | pointing.block+
   411  | pointing.block+
   381 
   412 
   382 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   413 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   383 
   414 
   384 blanks.blockquote = element blockquote {
   415 blanks.blockquote = element blockquote {
   385    blockquote.attributes, blanks.blockquote.content }
   416    blockquote.attributes, blanks.blockquote.content }
       
   417 blanks-m.blockquote = element blockquote {
       
   418    blockquote.attributes, blanks-m.blockquote.content }
   386 pointing.blockquote = element blockquote {
   419 pointing.blockquote = element blockquote {
   387    blockquote.attributes, pointing.blockquote.content }
   420    blockquote.attributes, pointing.blockquote.content }
   388 
   421 
   389 blanks.blockquote.content =
   422 blanks.blockquote.content =
   390    block.head?,
   423    block.head?,
   391    (blanks.p | speech | blanks.list)+,
   424    (blanks.p | speech | blanks.list)+,
   392    attribution?
   425    attribution?
       
   426 blanks-m.blockquote.content =
       
   427    block.head?,
       
   428    (blanks-m.p | speech | blanks-m.list)+,
       
   429    attribution?
   393 pointing.blockquote.content =
   430 pointing.blockquote.content =
   394    block.head?,
   431    block.head?,
   395    (pointing.p | speech | pointing.list)+,
   432    (pointing.p | speech | pointing.list)+,
   396    attribution?
   433    attribution?
   397 
   434 
   398 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   435 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   399 
   436 
   400 # ~~~~~~ speech
   437 # ~~~~~~ speech
   401 blanks.speech = element speech { blanks.speech.content }
   438 blanks.speech = element speech { blanks.speech.content }
       
   439 blanks-m.speech = element speech { blanks-m.speech.content }
   402 pointing.speech = element speech { pointing.speech.content }
   440 pointing.speech = element speech { pointing.speech.content }
   403 
   441 
   404 blanks.speech.content =
   442 blanks.speech.content =
   405    blanks.speaker?,
   443    blanks.speaker?,
   406    stage?,
   444    stage?,
   407    (blanks.p | blanks.blockquote)+
   445    (blanks.p | blanks.blockquote)+
       
   446 blanks-m.speech.content =
       
   447    blanks-m.speaker?,
       
   448    stage?,
       
   449    (blanks-m.p | blanks-m.blockquote)+
   408 pointing.speech.content =
   450 pointing.speech.content =
   409    pointing.speaker?,
   451    pointing.speaker?,
   410    stage?,
   452    stage?,
   411    (pointing.p | pointing.blockquote)+
   453    (pointing.p | pointing.blockquote)+
   412 
   454 
   413 # ~~~~~~ speaker
   455 # ~~~~~~ speaker
   414 blanks.speaker = element speaker { blanks.speaker.content }
   456 blanks.speaker = element speaker { blanks.speaker.content }
       
   457 blanks-m.speaker = element speaker { blanks-m.speaker.content }
   415 pointing.speaker = element speaker { pointing.speaker.content }
   458 pointing.speaker = element speaker { pointing.speaker.content }
   416 
   459 
   417 blanks.speaker.content = blanks.inlines
   460 blanks.speaker.content = blanks.inlines
       
   461 blanks-m.speaker.content = blanks-m.inlines
   418 pointing.speaker.content = pointing.inlines
   462 pointing.speaker.content = pointing.inlines
   419 
   463 
   420 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   464 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   421 
   465 
   422 # ~~~~~~ table
   466 # ~~~~~~ table
   423 blanks.table = element table { table.attributes, blanks.table.content }
   467 blanks.table = element table { table.attributes, blanks.table.content }
       
   468 blanks-m.table = element table { table.attributes, blanks-m.table.content }
   424 pointing.table = element table { table.attributes, pointing.table.content }
   469 pointing.table = element table { table.attributes, pointing.table.content }
   425 
   470 
   426 blanks.table.content =
   471 blanks.table.content =
   427    block.head?,
   472    block.head?,
   428    ((thead?, blanks.tbody+) | blanks.tr+),
   473    ((thead?, blanks.tbody+) | blanks.tr+),
   429    blanks.table.caption?
   474    blanks.table.caption?
       
   475 blanks-m.table.content =
       
   476    block.head?,
       
   477    ((thead?, blanks-m.tbody+) | blanks-m.tr+),
       
   478    blanks-m.table.caption?
   430 pointing.table.content =
   479 pointing.table.content =
   431    block.head?,
   480    block.head?,
   432    ((thead?, pointing.tbody+) | pointing.tr+),
   481    ((thead?, pointing.tbody+) | pointing.tr+),
   433    pointing.table.caption?
   482    pointing.table.caption?
   434 
   483 
   435 # ~~~~~~ tbody
   484 # ~~~~~~ tbody
   436 blanks.tbody = element tbody { blanks.tbody.content }
   485 blanks.tbody = element tbody { blanks.tbody.content }
       
   486 blanks-m.tbody = element tbody { blanks-m.tbody.content }
   437 pointing.tbody = element tbody { pointing.tbody.content }
   487 pointing.tbody = element tbody { pointing.tbody.content }
   438 
   488 
   439 blanks.tbody.content =
   489 blanks.tbody.content =
   440    blanks.tr+
   490    blanks.tr+
       
   491 blanks-m.tbody.content =
       
   492    blanks-m.tr+
   441 pointing.tbody.content =
   493 pointing.tbody.content =
   442    pointing.tr+
   494    pointing.tr+
   443 
   495 
   444 # ~~~~~~ tr
   496 # ~~~~~~ tr
   445 blanks.tr = element tr { tr.attributes, blanks.tr.content }
   497 blanks.tr = element tr { tr.attributes, blanks.tr.content }
       
   498 blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
   446 pointing.tr = element tr { tr.attributes, pointing.tr.content }
   499 pointing.tr = element tr { tr.attributes, pointing.tr.content }
   447 
   500 
   448 blanks.tr.content =
   501 blanks.tr.content =
   449   (blanks.td | blanks.th)+
   502   (blanks.td | blanks.th)+
       
   503 blanks-m.tr.content =
       
   504   (blanks-m.td | blanks-m.th)+
   450 pointing.tr.content =
   505 pointing.tr.content =
   451   (pointing.td | pointing.th)+
   506   (pointing.td | pointing.th)+
   452 
   507 
   453 # ~~~~~~ td, th
   508 # ~~~~~~ td, th
   454 blanks.td = element td { td.attributes, blanks.td.content }
   509 blanks.td = element td { td.attributes, blanks.td.content }
   455 blanks.th = element th { td.attributes, blanks.td.content }
   510 blanks.th = element th { td.attributes, blanks.td.content }
       
   511 blanks-m.td = element td { td.attributes, blanks-m.td.content }
       
   512 blanks-m.th = element th { td.attributes, blanks-m.td.content }
   456 pointing.td = element td { td.attributes, pointing.td.content }
   513 pointing.td = element td { td.attributes, pointing.td.content }
   457 pointing.th = element th { td.attributes, pointing.td.content }
   514 pointing.th = element th { td.attributes, pointing.td.content }
   458 
   515 
   459 blanks.td.content =
   516 blanks.td.content =
   460    blanks.inlines
   517    blanks.inlines
   461  | (blanks.p | blanks.media)+
   518  | (blanks.p | blanks.media)+
       
   519 blanks-m.td.content =
       
   520    blanks-m.inlines
       
   521  | (blanks-m.p | blanks-m.media)+
   462 pointing.td.content =
   522 pointing.td.content =
   463    pointing.inlines
   523    pointing.inlines
   464  | (pointing.p | media)+
   524  | (pointing.p | media)+
   465 
   525 
   466 # ~~~~~~ table.caption
   526 # ~~~~~~ table.caption
   467 blanks.table.caption = element caption { blanks.caption.content }
   527 blanks.table.caption = element caption { blanks.caption.content }
       
   528 blanks-m.table.caption = element caption { blanks-m.caption.content }
   468 pointing.table.caption = element caption { pointing.caption.content }
   529 pointing.table.caption = element caption { pointing.caption.content }
   469 
   530 
   470 blanks.caption.content =
   531 blanks.caption.content =
   471    blanks.inlines
   532    blanks.inlines
   472  | (blanks.p | speech | blanks.list | blockquote)+
   533  | (blanks.p | speech | blanks.list | blockquote)+
       
   534 blanks-m.caption.content =
       
   535    blanks-m.inlines
       
   536  | (blanks-m.p | speech | blanks-m.list | blockquote)+
   473 pointing.caption.content =
   537 pointing.caption.content =
   474    pointing.inlines
   538    pointing.inlines
   475  | (pointing.p | speech | pointing.list | blockquote)+
   539  | (pointing.p | speech | pointing.list | blockquote)+
   476 
   540 
   477 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   541 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   478 
   542 
   479 # ~~~~~~ media
   543 # ~~~~~~ media
   480 blanks.media = element media { media.attributes, blanks.media.content }
   544 blanks.media = element media { media.attributes, blanks.media.content }
       
   545 blanks-m.media = element media { media.attributes, blanks-m.media.content }
   481 pointing.media = element media { media.attributes, pointing.media.content }
   546 pointing.media = element media { media.attributes, pointing.media.content }
   482 
   547 
   483 blanks.media.content =
   548 blanks.media.content =
   484    block.head?,
   549    block.head?,
   485    (blanks.image | audio | video)+,
   550    (blanks.image | audio | video)+,
   486    blanks.media.caption?,
   551    blanks.media.caption?,
   487    link?
   552    link?
       
   553 blanks-m.media.content =
       
   554    block.head?,
       
   555    (blanks-m.image | audio | video)+,
       
   556    blanks-m.media.caption?,
       
   557    link?
   488 pointing.media.content =
   558 pointing.media.content =
   489    block.head?,
   559    block.head?,
   490    (image | audio | video)+,
   560    (image | audio | video)+,
   491    pointing.media.caption?,
   561    pointing.media.caption?,
   492    link?
   562    link?
   493 
   563 
   494 # ~~~~~~ blanks.image
   564 # ~~~~~~ blanks.image
   495 blanks.image = element image { image.attributes, blanks.image.content }
   565 blanks.image = element image { image.attributes, blanks.image.content }
   496 mip.image = element image { image.attributes, mip.image.content }
   566 blanks-m.image = element image { image.attributes, blanks-m.image.content }
   497 
   567 
   498 blanks.image.content =
   568 blanks.image.content =
   499    copyright?,
   569    copyright?,
   500    blanks.dropzone*
   570    blanks.dropzone*
   501 mip.image.content =
   571 blanks-m.image.content =
   502    mip.dropzone+
   572    copyright?,
       
   573    blanks-m.dropzone*
   503 
   574 
   504 # ~~~~~~ dropzone
   575 # ~~~~~~ dropzone
   505 blanks.dropzone = element dropzone {
   576 blanks.dropzone = element dropzone {
   506    blanks.dropzone.attributes, blanks.dropzone.content }
   577    blanks.dropzone.attributes, blanks.dropzone.content }
   507 mip.dropzone = element dropzone {
   578 blanks-m.dropzone = element dropzone {
   508    mip.dropzone.attributes, mip.dropzone.content }
   579    blanks-m.dropzone.attributes, blanks-m.dropzone.content }
   509 
   580 
   510 blanks.dropzone.attributes =
   581 blanks.dropzone.attributes =
   511    x.attribute
   582    x.attribute
   512  & y.attribute
   583  & y.attribute
   513 mip.dropzone.attributes =
   584 blanks-m.dropzone.attributes =
   514    x.attribute
   585    x.attribute
   515  & y.attribute
   586  & y.attribute
       
   587  & h.attribute
   516  & w.attribute
   588  & w.attribute
   517  & h.attribute
       
   518 
   589 
   519 blanks.dropzone.content =
   590 blanks.dropzone.content =
   520    blank
   591    blank
   521 mip.dropzone.content =
   592 blanks-m.dropzone.content =
   522    image?,
   593    blank-m
   523    audio?
       
   524 
   594 
   525 # ~~~~~~ media.caption
   595 # ~~~~~~ media.caption
   526 blanks.media.caption = element caption {
   596 blanks.media.caption = element caption {
   527    caption.attributes, blanks.caption.content }
   597    caption.attributes, blanks.caption.content }
       
   598 blanks-m.media.caption = element caption {
       
   599    caption.attributes, blanks-m.caption.content }
   528 pointing.media.caption = element caption {
   600 pointing.media.caption = element caption {
   529    caption.attributes, pointing.caption.content }
   601    caption.attributes, pointing.caption.content }
   530 
   602 
   531 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   603 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   532 
   604 
   535 
   607 
   536 choices.right.content =
   608 choices.right.content =
   537    inlines
   609    inlines
   538  | ((p | image | (audio, image?) | video), help?, answer?)
   610  | ((p | image | (audio, image?) | video), help?, answer?)
   539 
   611 
   540 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   612 # ~~~~~~~~~~~~~~~~~~~~ blanks.intruders, blanks-m.intruders  ~~~~~~~~~~~~~~~~~~
   541 
   613 
   542 blanks.intruders = element intruders { blanks.intruders.content }
   614 blanks.intruders = element intruders { blanks.intruders.content }
   543 
   615 blanks-m.intruders = element intruders { blanks-m.intruders.content }
   544 blanks.intruders.content =
   616 
   545    blank+
   617 blanks.intruders.content = blank+
       
   618 blanks-m.intruders.content = blank-m+
   546 
   619 
   547 # ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
   620 # ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
   548 
   621 
   549 # ~~~~~~~ matching.intruders
   622 # ~~~~~~~ matching.intruders
   550 matching.intruders = element intruders { matching.intruders.content }
   623 matching.intruders = element intruders { matching.intruders.content }
   628  & smil*
   701  & smil*
   629 
   702 
   630  & blank*
   703  & blank*
   631 }
   704 }
   632 
   705 
   633 pointing.inlines = mixed {
   706 blanks-m.inlines = mixed {
   634    sup*
   707    sup*
   635  & sub*
   708  & sub*
   636  & var*
   709  & var*
   637  & number*
   710  & number*
   638  & acronym*
   711  & acronym*
   656  & index*
   729  & index*
   657  & image*
   730  & image*
   658  & audio*
   731  & audio*
   659  & smil*
   732  & smil*
   660 
   733 
       
   734  & blank-m*
       
   735 }
       
   736 
       
   737 pointing.inlines = mixed {
       
   738    sup*
       
   739  & sub*
       
   740  & var*
       
   741  & number*
       
   742  & acronym*
       
   743  & warning*
       
   744 
       
   745  & highlight*
       
   746  & emphasis*
       
   747  & mentioned*
       
   748  & literal*
       
   749  & term*
       
   750  & stage*
       
   751  & name*
       
   752  & foreign*
       
   753  & date*
       
   754  & math*
       
   755  & quote*
       
   756  & initial*
       
   757  & note*
       
   758  & link*
       
   759  & anchor*
       
   760  & index*
       
   761  & image*
       
   762  & audio*
       
   763  & smil*
       
   764 
   661  & point*
   765  & point*
   662 }
   766 }
   663 
   767 
   664 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   768 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   665 
   769 
   666 # ~~~~~~ blank
   770 # ~~~~~~ blank
   667 blank = element blank { blank.attributes, blank.content }
   771 blank = element blank { blank.attributes, blank.content }
   668 
   772 
   669 blank.attributes =
   773 blank.attributes =
   675 
   779 
   676 blank.content =
   780 blank.content =
   677    text
   781    text
   678  | (s+, help?, answer?)
   782  | (s+, help?, answer?)
   679 
   783 
       
   784 # ~~~~~~ blank-m
       
   785 blank-m = element blank { blank-m.content }
       
   786 blank-m.content =
       
   787    p
       
   788  | math
       
   789  | image
       
   790  | audio
       
   791  | (s-m+, help?, answer?)
       
   792 
   680 # ~~~~~~ s
   793 # ~~~~~~ s
   681 s = element s { s.content }
   794 s = element s { s.content }
   682 
       
   683 s.content = text
   795 s.content = text
   684 
   796 
       
   797 # ~~~~~~ s-m
       
   798 s-m = element s { s-m.content }
       
   799 s-m.content =
       
   800    p
       
   801  | math
       
   802  | image
       
   803  | audio
       
   804 
   685 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   805 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   686 
   806 
   687 point = element point { point.attributes, point.content }
   807 point = element point { point.attributes, point.content }
       
   808 pip.point = element point { pip.point.attributes, point.content }
   688 
   809 
   689 point.attributes =
   810 point.attributes =
   690    point.ref.attribute?
   811    point.ref.attribute?
       
   812 pip.point.attributes =
       
   813    point.ref.attribute?
       
   814  & x.attribute
       
   815  & y.attribute
       
   816  & w.attribute
       
   817  & h.attribute
       
   818 
   691 point.ref.attribute = attribute ref {
   819 point.ref.attribute = attribute ref {
   692    "right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
   820    "right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
   693 
   821 
   694 point.content = inlines
   822 point.content = inlines