diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/publiquiz.rnc dim. févr. 03 19:22:41 2013 +0100 @@ -155,12 +155,20 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~ matching matching = element matching { matching.content } matching.content = match, match+ +# ~~~~~~ match +match = element match { match.content } + +match.content = + match.item, + match.item + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort = element sort { sort.attributes, sort.content } @@ -204,7 +212,11 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ composite -composite = element composite { composite.content } +composite = element composite { composite.attributes, composite.content } + +composite.attributes = + multipage.attribute? +multipage.attribute = attribute multipage { xsd:boolean } composite.content = subquiz, @@ -337,7 +349,6 @@ point.inlines | (p | media)+ - # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~ choices.right = element right { choices.right.content } @@ -345,8 +356,7 @@ choices.right.content = inlines - | ((p+ | image | (audio, image?)), help?, answer?) - + | ((p | image | (audio, image?) | video), help?, answer?) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -361,13 +371,13 @@ blanks.wrong.content = text -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ match ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -match = element match { match.content } +match.item = element item { match.item.content } -match.content = - (p | section), - (p | section) +match.item.content = + inlines + | (image | (audio, image?) | video) # ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -383,14 +393,17 @@ item.shuffle.attribute? item.shuffle.attribute = attribute shuffle { xsd:integer } -sort.item.content = inlines +sort.item.content = + inlines + | (image | (audio, image?) | video) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ category.item category.item = element item { category.item.content } -category.item.content = inlines +category.item.content = + inlines + | (image | (audio, image?) | video) # =============================================================================