RelaxNG/publiquiz.rnc
changeset 448 9bc794bf36b0
parent 442 e3341312dff7
child 450 fd645a45932e
equal deleted inserted replaced
447:c00766638a7b 448:9bc794bf36b0
     1 # $Id$
       
     2 
       
     3 
     1 
     4 include "publidoc.rnc" {
     2 include "publidoc.rnc" {
     5    start = publiquiz
     3    start = publiquiz
     6 
     4 
     7    document.content =
     5    document.content =
   126  | pointing-categories
   124  | pointing-categories
   127  | matching
   125  | matching
   128  | sort
   126  | sort
   129  | categories
   127  | categories
   130  | wordsearch
   128  | wordsearch
       
   129  | flashcard
   131  | production
   130  | production
   132 
   131 
   133 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   132 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   134 
   133 
   135 choices-radio = element choices-radio {
   134 choices-radio = element choices-radio {
   187    (blanks-m.block+ | blanks-m.section+)
   186    (blanks-m.block+ | blanks-m.section+)
   188 blanks-choices.content =
   187 blanks-choices.content =
   189    (blanks-c.block+ | blanks-c.section+)
   188    (blanks-c.block+ | blanks-c.section+)
   190 
   189 
   191 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   190 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   192 correct-line = element correct-line {
   191 
   193    correct.attributes, correct.content }
   192 correct-line = element correct-line { correct.attributes, correct.content }
   194 
   193 
   195 correct.attributes = 
   194 correct.attributes = 
   196    remove-space.attribute?
   195    remove-space.attribute?
   197 remove-space.attribute = attribute remove-space { xsd:boolean }
   196 remove-space.attribute = attribute remove-space { xsd:boolean }
   198 
   197 
   315 category.content =
   314 category.content =
   316    category.head,
   315    category.head,
   317    category.item*
   316    category.item*
   318 
   317 
   319 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   318 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   319 
   320 wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content }
   320 wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content }
   321 
   321 
   322 wordsearch.attributes =
   322 wordsearch.attributes =
   323    strict.attribute ?
   323    strict.attribute ?
   324  & wordlist.attribute ?
   324  & wordlist.attribute ?
   341 line.content = cell+
   341 line.content = cell+
   342 
   342 
   343 cell = element cell {cell.content}
   343 cell = element cell {cell.content}
   344 cell.content = xsd:token {pattern = "."}
   344 cell.content = xsd:token {pattern = "."}
   345    
   345    
       
   346 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flashcard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   347 
       
   348 # ~~~~~~ flashcard
       
   349 flashcard = element flashcard { flashcard.content }
       
   350 
       
   351 flashcard.content =
       
   352    side1,
       
   353    side2
       
   354 
       
   355 # ~~~~~~ side1
       
   356 side1 = element side1 { side1.content }
       
   357 
       
   358 side1.content =
       
   359     section+ | block+
       
   360 
       
   361 # ~~~~~~ side2
       
   362 side2 = element side2 { side2.content }
       
   363 
       
   364 side2.content =
       
   365     instructions?,
       
   366     flashcard.engine,
       
   367     help?,
       
   368     answer?
       
   369 
       
   370 # ~~~~~~ flashcard.engine
       
   371 flashcard.engine =
       
   372     choices-radio
       
   373     | choices-check
       
   374     | blanks-fill
       
   375     | blanks-select
       
   376     | sort
       
   377 
   346 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   378 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   347 
   379 
   348 production = element production { production.content }
   380 production = element production { production.content }
   349 
   381 
   350 production.content = text
   382 production.content = text