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