RelaxNG/publiquiz.rnc
changeset 441 2b94d6c7fe0c
parent 438 f4ab39840020
child 442 e3341312dff7
equal deleted inserted replaced
440:eef3c4d7bfe7 441:2b94d6c7fe0c
    12       division.head?,
    12       division.head?,
    13       front?,
    13       front?,
    14       (division | topic | quiz)+
    14       (division | topic | quiz)+
    15 
    15 
    16    nowrap.content =
    16    nowrap.content =
    17       inlines | blanks.inlines | blanks-m.inlines | pointing.inlines
    17        inlines | blanks.inlines | blanks-m.inlines | blanks-c.inlines
       
    18        | pointing.inlines
    18 }
    19 }
    19 
    20 
    20 
    21 
    21 publiquiz = element publiquiz {
    22 publiquiz = element publiquiz {
    22    publiquiz.attributes,
    23    publiquiz.attributes,
    82 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    83 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    83 
    84 
    84 blanks.section = element section { section.attributes, blanks.section.content }
    85 blanks.section = element section { section.attributes, blanks.section.content }
    85 blanks-m.section = element section {
    86 blanks-m.section = element section {
    86    section.attributes, blanks-m.section.content }
    87    section.attributes, blanks-m.section.content }
       
    88 blanks-c.section = element section {
       
    89    section.attributes, blanks-c.section.content }
    87 pointing.section = element section {
    90 pointing.section = element section {
    88    section.attributes, pointing.section.content }
    91    section.attributes, pointing.section.content }
    89 
    92 
    90 blanks.section.content =
    93 blanks.section.content =
    91    section.head?,
    94    section.head?,
    92    (blanks.section+ | blanks.block+)
    95    (blanks.section+ | blanks.block+)
    93 blanks-m.section.content =
    96 blanks-m.section.content =
    94    section.head?,
    97    section.head?,
    95    (blanks-m.section+ | blanks-m.block+)
    98    (blanks-m.section+ | blanks-m.block+)
       
    99 blanks-c.section.content =
       
   100    section.head?,
       
   101    (blanks-c.section+ | blanks-c.block+)
    96 pointing.section.content =
   102 pointing.section.content =
    97    section.head?,
   103    section.head?,
    98    (pointing.section+ | pointing.block+)
   104    (pointing.section+ | pointing.block+)
    99 
   105 
   100 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   106 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   107    choices-radio
   113    choices-radio
   108  | choices-check
   114  | choices-check
   109  | blanks-fill
   115  | blanks-fill
   110  | blanks-select
   116  | blanks-select
   111  | blanks-media
   117  | blanks-media
       
   118  | blanks-choices
   112  | blanks-char
   119  | blanks-char
   113  | pointing
   120  | pointing
   114  | pointing-categories
   121  | pointing-categories
   115  | pip
       
   116  | matching
   122  | matching
   117  | sort
   123  | sort
   118  | categories
   124  | categories
   119  | wordsearch
   125  | wordsearch
   120  | production
   126  | production
   146    blanks-fill.attributes, blanks-fill.content }
   152    blanks-fill.attributes, blanks-fill.content }
   147 blanks-select = element blanks-select {
   153 blanks-select = element blanks-select {
   148    blanks-select.attributes, blanks-select.content }
   154    blanks-select.attributes, blanks-select.content }
   149 blanks-media = element blanks-media {
   155 blanks-media = element blanks-media {
   150    blanks-select.attributes, blanks-media.content }
   156    blanks-select.attributes, blanks-media.content }
       
   157 blanks-choices = element blanks-choices {
       
   158    blanks-choices.content }
   151 blanks-char = element blanks-char {
   159 blanks-char = element blanks-char {
   152    blanks-char.attributes, blanks-select.content }
   160    blanks-char.attributes, blanks-select.content }
   153 
   161 
   154 blanks-fill.attributes =
   162 blanks-fill.attributes =
   155    success.attribute?
   163    success.attribute?
   172    blanks.intruders?,
   180    blanks.intruders?,
   173    (blanks.block+ | blanks.section+)
   181    (blanks.block+ | blanks.section+)
   174 blanks-media.content =
   182 blanks-media.content =
   175    blanks-m.intruders?,
   183    blanks-m.intruders?,
   176    (blanks-m.block+ | blanks-m.section+)
   184    (blanks-m.block+ | blanks-m.section+)
       
   185 blanks-choices.content =
       
   186    (blanks-c.block+ | blanks-c.section+)
   177 
   187 
   178 blanks-char.attributes =
   188 blanks-char.attributes =
   179    remove-space.attribute?
   189    remove-space.attribute?
   180 remove-space.attribute = attribute remove-space { xsd:boolean }
   190 remove-space.attribute = attribute remove-space { xsd:boolean }
   181 
   191 
   225 pointing-c.category5 = element category {
   235 pointing-c.category5 = element category {
   226    attribute id { "5" }, pointing-c.category.content }
   236    attribute id { "5" }, pointing-c.category.content }
   227 
   237 
   228 pointing-c.category.content = inlines
   238 pointing-c.category.content = inlines
   229 
   239 
   230 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   231 
       
   232 pip = element pip { pip.content }
       
   233 
       
   234 pip.content =
       
   235    pip.image
       
   236 
       
   237 pip.image = element image { image.attributes, pip.image.content }
       
   238 pip.image.content =
       
   239    pip.point+
       
   240 
       
   241 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   240 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   242 
   241 
   243 # ~~~~~~ matching
   242 # ~~~~~~ matching
   244 matching = element matching { matching.attributes, matching.content }
   243 matching = element matching { matching.attributes, matching.content }
   245 
   244 
   389    blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
   388    blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
   390  | blanks.media)
   389  | blanks.media)
   391 blanks-m.block = (
   390 blanks-m.block = (
   392    blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
   391    blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
   393  | blanks-m.table | blanks-m.media)
   392  | blanks-m.table | blanks-m.media)
       
   393 blanks-c.block = (
       
   394    blanks-c.p | blanks-c.list | blanks-c.blockquote | blanks-c.speech
       
   395  | blanks-c.table | blanks-c.media)
   394 pointing.block = (
   396 pointing.block = (
   395    pointing.p | pointing.list | pointing.blockquote | pointing.speech
   397    pointing.p | pointing.list | pointing.blockquote | pointing.speech
   396  | pointing.table | media)
   398  | pointing.table | media)
   397 
   399 
   398 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   400 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   399 
   401 
   400 blanks.p = element p { blanks.p.content }
   402 blanks.p = element p { blanks.p.content }
   401 blanks-m.p = element p { blanks-m.p.content }
   403 blanks-m.p = element p { blanks-m.p.content }
       
   404 blanks-c.p = element p { blanks-c.p.content }
   402 pointing.p = element p { pointing.p.content }
   405 pointing.p = element p { pointing.p.content }
   403 
   406 
   404 blanks.p.content =
   407 blanks.p.content =
   405    blanks.inlines
   408    blanks.inlines
   406 blanks-m.p.content =
   409 blanks-m.p.content =
   407    blanks-m.inlines
   410    blanks-m.inlines
       
   411 blanks-c.p.content =
       
   412    blanks-c.inlines
   408 pointing.p.content =
   413 pointing.p.content =
   409    pointing.inlines
   414    pointing.inlines
   410 
   415 
   411 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   416 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   412 
   417 
   416    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   421    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   417     | (attribute type {"glossary"}, item.glossary+) )
   422     | (attribute type {"glossary"}, item.glossary+) )
   418 }
   423 }
   419 blanks-m.list = element list {
   424 blanks-m.list = element list {
   420    block.head?,
   425    block.head?,
       
   426    (  (attribute type {"ordered"}?, blanks-m.item, blanks-m.item+)
       
   427     | (attribute type {"glossary"}, item.glossary+) )
       
   428 }
       
   429 blanks-c.list = element list {
       
   430    block.head?,
   421    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   431    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
   422     | (attribute type {"glossary"}, item.glossary+) )
   432     | (attribute type {"glossary"}, item.glossary+) )
   423 }
   433 }
   424 pointing.list = element list {
   434 pointing.list = element list {
   425    block.head?,
   435    block.head?,
   427     | (attribute type {"glossary"}, item.glossary+) )
   437     | (attribute type {"glossary"}, item.glossary+) )
   428 }
   438 }
   429 
   439 
   430 # ~~~~~~ item
   440 # ~~~~~~ item
   431 blanks.item = element item { blanks.item.content }
   441 blanks.item = element item { blanks.item.content }
   432 blanks-m.item = element item { blanks.item.content }
   442 blanks-m.item = element item { blanks-m.item.content }
       
   443 blanks-c.item = element item { blanks-c.item.content }
   433 pointing.item = element item { pointing.item.content }
   444 pointing.item = element item { pointing.item.content }
   434 
   445 
   435 blanks.item.content =
   446 blanks.item.content =
   436    blanks.inlines
   447    blanks.inlines
   437  | blanks.block+
   448  | blanks.block+
   438 blanks-m.item.content =
   449 blanks-m.item.content =
   439    blanks-m.inlines
   450    blanks-m.inlines
   440  | blanks-m.block+
   451  | blanks-m.block+
       
   452 blanks-c.item.content =
       
   453    blanks-c.inlines
       
   454  | blanks-c.block+
   441 pointing.item.content =
   455 pointing.item.content =
   442    pointing.inlines
   456    pointing.inlines
   443  | pointing.block+
   457  | pointing.block+
   444 
   458 
   445 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   459 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   446 
   460 
   447 blanks.blockquote = element blockquote {
   461 blanks.blockquote = element blockquote {
   448    blockquote.attributes, blanks.blockquote.content }
   462    blockquote.attributes, blanks.blockquote.content }
   449 blanks-m.blockquote = element blockquote {
   463 blanks-m.blockquote = element blockquote {
   450    blockquote.attributes, blanks-m.blockquote.content }
   464    blockquote.attributes, blanks-m.blockquote.content }
       
   465 blanks-c.blockquote = element blockquote {
       
   466    blockquote.attributes, blanks-c.blockquote.content }
   451 pointing.blockquote = element blockquote {
   467 pointing.blockquote = element blockquote {
   452    blockquote.attributes, pointing.blockquote.content }
   468    blockquote.attributes, pointing.blockquote.content }
   453 
   469 
   454 blanks.blockquote.content =
   470 blanks.blockquote.content =
   455    block.head?,
   471    block.head?,
   457    attribution?
   473    attribution?
   458 blanks-m.blockquote.content =
   474 blanks-m.blockquote.content =
   459    block.head?,
   475    block.head?,
   460    (blanks-m.p | speech | blanks-m.list)+,
   476    (blanks-m.p | speech | blanks-m.list)+,
   461    attribution?
   477    attribution?
       
   478 blanks-c.blockquote.content =
       
   479    block.head?,
       
   480    (blanks-c.p | speech | blanks-c.list)+,
       
   481    attribution?
   462 pointing.blockquote.content =
   482 pointing.blockquote.content =
   463    block.head?,
   483    block.head?,
   464    (pointing.p | speech | pointing.list)+,
   484    (pointing.p | speech | pointing.list)+,
   465    attribution?
   485    attribution?
   466 
   486 
   467 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   487 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   468 
   488 
   469 # ~~~~~~ speech
   489 # ~~~~~~ speech
   470 blanks.speech = element speech { blanks.speech.content }
   490 blanks.speech = element speech { blanks.speech.content }
   471 blanks-m.speech = element speech { blanks-m.speech.content }
   491 blanks-m.speech = element speech { blanks-m.speech.content }
       
   492 blanks-c.speech = element speech { blanks-c.speech.content }
   472 pointing.speech = element speech { pointing.speech.content }
   493 pointing.speech = element speech { pointing.speech.content }
   473 
   494 
   474 blanks.speech.content =
   495 blanks.speech.content =
   475    blanks.speaker?,
   496    blanks.speaker?,
   476    stage?,
   497    stage?,
   477    (blanks.p | blanks.blockquote)+
   498    (blanks.p | blanks.blockquote)+
   478 blanks-m.speech.content =
   499 blanks-m.speech.content =
   479    blanks-m.speaker?,
   500    blanks-m.speaker?,
   480    stage?,
   501    stage?,
   481    (blanks-m.p | blanks-m.blockquote)+
   502    (blanks-m.p | blanks-m.blockquote)+
       
   503 blanks-c.speech.content =
       
   504    blanks-c.speaker?,
       
   505    stage?,
       
   506    (blanks-c.p | blanks-c.blockquote)+
   482 pointing.speech.content =
   507 pointing.speech.content =
   483    pointing.speaker?,
   508    pointing.speaker?,
   484    stage?,
   509    stage?,
   485    (pointing.p | pointing.blockquote)+
   510    (pointing.p | pointing.blockquote)+
   486 
   511 
   487 # ~~~~~~ speaker
   512 # ~~~~~~ speaker
   488 blanks.speaker = element speaker { blanks.speaker.content }
   513 blanks.speaker = element speaker { blanks.speaker.content }
   489 blanks-m.speaker = element speaker { blanks-m.speaker.content }
   514 blanks-m.speaker = element speaker { blanks-m.speaker.content }
       
   515 blanks-c.speaker = element speaker { blanks-c.speaker.content }
   490 pointing.speaker = element speaker { pointing.speaker.content }
   516 pointing.speaker = element speaker { pointing.speaker.content }
   491 
   517 
   492 blanks.speaker.content = blanks.inlines
   518 blanks.speaker.content = blanks.inlines
   493 blanks-m.speaker.content = blanks-m.inlines
   519 blanks-m.speaker.content = blanks-m.inlines
       
   520 blanks-c.speaker.content = blanks-c.inlines
   494 pointing.speaker.content = pointing.inlines
   521 pointing.speaker.content = pointing.inlines
   495 
   522 
   496 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   523 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   497 
   524 
   498 # ~~~~~~ table
   525 # ~~~~~~ table
   499 blanks.table = element table { table.attributes, blanks.table.content }
   526 blanks.table = element table { table.attributes, blanks.table.content }
   500 blanks-m.table = element table { table.attributes, blanks-m.table.content }
   527 blanks-m.table = element table { table.attributes, blanks-m.table.content }
       
   528 blanks-c.table = element table { table.attributes, blanks-m.table.content }
   501 pointing.table = element table { table.attributes, pointing.table.content }
   529 pointing.table = element table { table.attributes, pointing.table.content }
   502 
   530 
   503 blanks.table.content =
   531 blanks.table.content =
   504    block.head?,
   532    block.head?,
   505    ((thead?, blanks.tbody+) | blanks.tr+),
   533    ((thead?, blanks.tbody+) | blanks.tr+),
   506    blanks.table.caption?
   534    blanks.table.caption?
   507 blanks-m.table.content =
   535 blanks-m.table.content =
   508    block.head?,
   536    block.head?,
   509    ((thead?, blanks-m.tbody+) | blanks-m.tr+),
   537    ((thead?, blanks-m.tbody+) | blanks-m.tr+),
   510    blanks-m.table.caption?
   538    blanks-m.table.caption?
       
   539 blanks-c.table.content =
       
   540    block.head?,
       
   541    ((thead?, blanks-c.tbody+) | blanks-c.tr+),
       
   542    blanks-c.table.caption?
   511 pointing.table.content =
   543 pointing.table.content =
   512    block.head?,
   544    block.head?,
   513    ((thead?, pointing.tbody+) | pointing.tr+),
   545    ((thead?, pointing.tbody+) | pointing.tr+),
   514    pointing.table.caption?
   546    pointing.table.caption?
   515 
   547 
   516 # ~~~~~~ tbody
   548 # ~~~~~~ tbody
   517 blanks.tbody = element tbody { blanks.tbody.content }
   549 blanks.tbody = element tbody { blanks.tbody.content }
   518 blanks-m.tbody = element tbody { blanks-m.tbody.content }
   550 blanks-m.tbody = element tbody { blanks-m.tbody.content }
       
   551 blanks-c.tbody = element tbody { blanks-m.tbody.content }
   519 pointing.tbody = element tbody { pointing.tbody.content }
   552 pointing.tbody = element tbody { pointing.tbody.content }
   520 
   553 
   521 blanks.tbody.content =
   554 blanks.tbody.content =
   522    blanks.tr+
   555    blanks.tr+
   523 blanks-m.tbody.content =
   556 blanks-m.tbody.content =
   524    blanks-m.tr+
   557    blanks-m.tr+
       
   558 blanks-c.tbody.content =
       
   559    blanks-c.tr+
   525 pointing.tbody.content =
   560 pointing.tbody.content =
   526    pointing.tr+
   561    pointing.tr+
   527 
   562 
   528 # ~~~~~~ tr
   563 # ~~~~~~ tr
   529 blanks.tr = element tr { tr.attributes, blanks.tr.content }
   564 blanks.tr = element tr { tr.attributes, blanks.tr.content }
   530 blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
   565 blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
       
   566 blanks-c.tr = element tr { tr.attributes, blanks-c.tr.content }
   531 pointing.tr = element tr { tr.attributes, pointing.tr.content }
   567 pointing.tr = element tr { tr.attributes, pointing.tr.content }
   532 
   568 
   533 blanks.tr.content =
   569 blanks.tr.content =
   534   (blanks.td | blanks.th)+
   570   (blanks.td | blanks.th)+
   535 blanks-m.tr.content =
   571 blanks-m.tr.content =
   536   (blanks-m.td | blanks-m.th)+
   572   (blanks-m.td | blanks-m.th)+
       
   573 blanks-c.tr.content =
       
   574   (blanks-c.td | blanks-c.th)+
   537 pointing.tr.content =
   575 pointing.tr.content =
   538   (pointing.td | pointing.th)+
   576   (pointing.td | pointing.th)+
   539 
   577 
   540 # ~~~~~~ td, th
   578 # ~~~~~~ td, th
   541 blanks.td = element td { td.attributes, blanks.td.content }
   579 blanks.td = element td { td.attributes, blanks.td.content }
   542 blanks.th = element th { td.attributes, blanks.td.content }
   580 blanks.th = element th { td.attributes, blanks.td.content }
   543 blanks-m.td = element td { td.attributes, blanks-m.td.content }
   581 blanks-m.td = element td { td.attributes, blanks-m.td.content }
   544 blanks-m.th = element th { td.attributes, blanks-m.td.content }
   582 blanks-m.th = element th { td.attributes, blanks-m.td.content }
       
   583 blanks-c.td = element td { td.attributes, blanks-c.td.content }
       
   584 blanks-c.th = element th { td.attributes, blanks-c.td.content }
   545 pointing.td = element td { td.attributes, pointing.td.content }
   585 pointing.td = element td { td.attributes, pointing.td.content }
   546 pointing.th = element th { td.attributes, pointing.td.content }
   586 pointing.th = element th { td.attributes, pointing.td.content }
   547 
   587 
   548 blanks.td.content =
   588 blanks.td.content =
   549    blanks.inlines
   589    blanks.inlines
   550  | (blanks.p | blanks.media)+
   590  | (blanks.p | blanks.media)+
   551 blanks-m.td.content =
   591 blanks-m.td.content =
   552    blanks-m.inlines
   592    blanks-m.inlines
   553  | (blanks-m.p | blanks-m.media)+
   593  | (blanks-m.p | blanks-m.media)+
       
   594 blanks-c.td.content =
       
   595    blanks-c.inlines
       
   596  | (blanks-c.p | blanks-c.media)+
   554 pointing.td.content =
   597 pointing.td.content =
   555    pointing.inlines
   598    pointing.inlines
   556  | (pointing.p | media)+
   599  | (pointing.p | media)+
   557 
   600 
   558 # ~~~~~~ table.caption
   601 # ~~~~~~ table.caption
   559 blanks.table.caption = element caption { blanks.caption.content }
   602 blanks.table.caption = element caption { blanks.caption.content }
   560 blanks-m.table.caption = element caption { blanks-m.caption.content }
   603 blanks-m.table.caption = element caption { blanks-m.caption.content }
       
   604 blanks-c.table.caption = element caption { blanks-c.caption.content }
   561 pointing.table.caption = element caption { pointing.caption.content }
   605 pointing.table.caption = element caption { pointing.caption.content }
   562 
   606 
   563 blanks.caption.content =
   607 blanks.caption.content =
   564    blanks.inlines
   608    blanks.inlines
   565  | (blanks.p | speech | blanks.list | blockquote)+
   609  | (blanks.p | speech | blanks.list | blockquote)+
   566 blanks-m.caption.content =
   610 blanks-m.caption.content =
   567    blanks-m.inlines
   611    blanks-m.inlines
   568  | (blanks-m.p | speech | blanks-m.list | blockquote)+
   612  | (blanks-m.p | speech | blanks-m.list | blockquote)+
       
   613 blanks-c.caption.content =
       
   614    blanks-c.inlines
       
   615  | (blanks-c.p | speech | blanks-c.list | blockquote)+
   569 pointing.caption.content =
   616 pointing.caption.content =
   570    pointing.inlines
   617    pointing.inlines
   571  | (pointing.p | speech | pointing.list | blockquote)+
   618  | (pointing.p | speech | pointing.list | blockquote)+
   572 
   619 
   573 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   620 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   574 
   621 
   575 # ~~~~~~ media
   622 # ~~~~~~ media
   576 blanks.media = element media { media.attributes, blanks.media.content }
   623 blanks.media = element media { media.attributes, blanks.media.content }
   577 blanks-m.media = element media { media.attributes, blanks-m.media.content }
   624 blanks-m.media = element media { media.attributes, blanks-m.media.content }
       
   625 blanks-c.media = element media { media.attributes, blanks-c.media.content }
   578 pointing.media = element media { media.attributes, pointing.media.content }
   626 pointing.media = element media { media.attributes, pointing.media.content }
   579 
   627 
   580 blanks.media.content =
   628 blanks.media.content =
   581    block.head?,
   629    block.head?,
   582    (blanks.image | audio | video)+,
   630    (blanks.image | audio | video)+,
   584    link?
   632    link?
   585 blanks-m.media.content =
   633 blanks-m.media.content =
   586    block.head?,
   634    block.head?,
   587    (blanks-m.image | audio | video)+,
   635    (blanks-m.image | audio | video)+,
   588    blanks-m.media.caption?,
   636    blanks-m.media.caption?,
       
   637    link?
       
   638 blanks-c.media.content =
       
   639    block.head?,
       
   640    (image | audio | video)+,
       
   641    blanks-c.media.caption?,
   589    link?
   642    link?
   590 pointing.media.content =
   643 pointing.media.content =
   591    block.head?,
   644    block.head?,
   592    (image | audio | video)+,
   645    (image | audio | video)+,
   593    pointing.media.caption?,
   646    pointing.media.caption?,
   627 # ~~~~~~ media.caption
   680 # ~~~~~~ media.caption
   628 blanks.media.caption = element caption {
   681 blanks.media.caption = element caption {
   629    caption.attributes, blanks.caption.content }
   682    caption.attributes, blanks.caption.content }
   630 blanks-m.media.caption = element caption {
   683 blanks-m.media.caption = element caption {
   631    caption.attributes, blanks-m.caption.content }
   684    caption.attributes, blanks-m.caption.content }
       
   685 blanks-c.media.caption = element caption {
       
   686    caption.attributes, blanks-c.caption.content }
   632 pointing.media.caption = element caption {
   687 pointing.media.caption = element caption {
   633    caption.attributes, pointing.caption.content }
   688    caption.attributes, pointing.caption.content }
   634 
   689 
   635 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   690 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   636 
   691 
   782  & nowrap*
   837  & nowrap*
   783 
   838 
   784  & blank-m*
   839  & blank-m*
   785 }
   840 }
   786 
   841 
   787 pointing.inlines = mixed {
   842 blanks-c.inlines = mixed {
   788    sup*
   843    sup*
   789  & sub*
   844  & sub*
   790  & var*
   845  & var*
   791  & number*
   846  & number*
   792  & acronym*
   847  & acronym*
   811  & image*
   866  & image*
   812  & audio*
   867  & audio*
   813  & smil*
   868  & smil*
   814  & nowrap*
   869  & nowrap*
   815 
   870 
       
   871  & blank-c*
       
   872 }
       
   873 
       
   874 pointing.inlines = mixed {
       
   875    sup*
       
   876  & sub*
       
   877  & var*
       
   878  & number*
       
   879  & acronym*
       
   880  & warning*
       
   881 
       
   882  & highlight*
       
   883  & emphasis*
       
   884  & mentioned*
       
   885  & literal*
       
   886  & term*
       
   887  & stage*
       
   888  & name*
       
   889  & foreign*
       
   890  & date*
       
   891  & math*
       
   892  & quote*
       
   893  & initial*
       
   894  & note*
       
   895  & link*
       
   896  & anchor*
       
   897  & index*
       
   898  & image*
       
   899  & audio*
       
   900  & smil*
       
   901  & nowrap*
       
   902 
   816  & point*
   903  & point*
   817 }
   904 }
   818 
   905 
   819 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   906 # ~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m, blank-c ~~~~~~~~~~~~~~~~~~~~~~~~~~
   820 
   907 
   821 # ~~~~~~ blank
   908 # ~~~~~~ blank
   822 blank = element blank { blank.attributes, blank.content }
   909 blank = element blank { blank.attributes, blank.content }
   823 
   910 
   824 blank.attributes =
   911 blank.attributes =
   838    p
   925    p
   839  | math
   926  | math
   840  | image
   927  | image
   841  | audio
   928  | audio
   842  | (s-m+, help?, answer?)
   929  | (s-m+, help?, answer?)
       
   930        
       
   931 # ~~~~~~ blank-c
       
   932 blank-c = element blank { blank-c.attributes, blank-c.content }
       
   933                   
       
   934 blank-c.attributes = form.attribute?
       
   935 form.attribute = attribute form { 'radio' | 'check' }
       
   936                                 
       
   937 blank-c.content = (blank-c.right | blank-c.wrong)+, help?, answer?
       
   938 blank-c.right = element right { inlines }
       
   939 blank-c.wrong = element wrong { inlines }                      
   843 
   940 
   844 # ~~~~~~ s
   941 # ~~~~~~ s
   845 s = element s { s.content }
   942 s = element s { s.content }
   846 s.content = text
   943 s.content = text
   847 
   944 
   854  | audio
   951  | audio
   855 
   952 
   856 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   953 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   857 
   954 
   858 point = element point { point.attributes, point.content }
   955 point = element point { point.attributes, point.content }
   859 pip.point = element point { pip.point.attributes, point.content }
       
   860 
   956 
   861 point.attributes =
   957 point.attributes =
   862    point.ref.attribute?
   958    point.ref.attribute?
   863 pip.point.attributes =
       
   864    point.ref.attribute?
       
   865  & x.attribute
       
   866  & y.attribute
       
   867  & w.attribute
       
   868  & h.attribute
       
   869 
   959 
   870 point.ref.attribute = attribute ref {
   960 point.ref.attribute = attribute ref {
   871    "right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
   961    "right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }
   872 
   962 
   873 point.content = inlines
   963 point.content = inlines