RelaxNG/publiquiz.rnc
changeset 438 f4ab39840020
parent 437 ad751158803d
child 441 2b94d6c7fe0c
equal deleted inserted replaced
437:ad751158803d 438:f4ab39840020
   114  | pointing-categories
   114  | pointing-categories
   115  | pip
   115  | pip
   116  | matching
   116  | matching
   117  | sort
   117  | sort
   118  | categories
   118  | categories
       
   119  | wordsearch
   119  | production
   120  | production
   120 
   121 
   121 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   122 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   122 
   123 
   123 choices-radio = element choices-radio {
   124 choices-radio = element choices-radio {
   243 matching = element matching { matching.attributes, matching.content }
   244 matching = element matching { matching.attributes, matching.content }
   244 
   245 
   245 matching.attributes =
   246 matching.attributes =
   246    success.attribute?
   247    success.attribute?
   247  & multiple.attribute?
   248  & multiple.attribute?
       
   249  & noshuffle.attribute?
   248  & orientation.attribute?
   250  & orientation.attribute?
   249 
   251 
   250 matching.content =
   252 matching.content =
   251    matching.intruders?,
   253    matching.intruders?,
   252    match,
   254    match,
   302 
   304 
   303 category.content =
   305 category.content =
   304    category.head,
   306    category.head,
   305    category.item*
   307    category.item*
   306 
   308 
       
   309 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   310 wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content }
       
   311 
       
   312 wordsearch.attributes =
       
   313    strict.attribute ?
       
   314  & wordlist.attribute ?
       
   315 
       
   316 wordlist.attribute = attribute wordlist { "hidden" | "right" | "left" }
       
   317 
       
   318 wordsearch.content =
       
   319    words
       
   320  & grid
       
   321 
       
   322 # ~~~~~~ words
       
   323 words = element words {words.content}
       
   324 words.content = words.item+
       
   325 
       
   326 # ~~~~~~ grid
       
   327 grid = element grid {grid.content}
       
   328 grid.content = line+
       
   329 
       
   330 line = element line {line.content}
       
   331 line.content = cell+
       
   332 
       
   333 cell = element cell {cell.content}
       
   334 cell.content = xsd:token {pattern = "."}
       
   335    
   307 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   336 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   308 
   337 
   309 production = element production { production.content }
   338 production = element production { production.content }
   310 
   339 
   311 production.content = text
   340 production.content = text
   665 category.item = element item { category.item.content }
   694 category.item = element item { category.item.content }
   666 
   695 
   667 category.item.content =
   696 category.item.content =
   668    inlines
   697    inlines
   669  | (p, help?, answer?)
   698  | (p, help?, answer?)
       
   699 
       
   700 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ words.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   701 words.item = element item {words.item.content, words.item.attributes }
       
   702   
       
   703 words.item.content = inlines
       
   704 
       
   705 words.item.attributes =
       
   706    startx
       
   707  & starty
       
   708  & endx
       
   709  & endy
       
   710 
       
   711 startx = attribute startx {xsd:token {pattern = "[a-zA-Z]+"}}
       
   712 starty = attribute starty {xsd:token {pattern = "\d+"}}
       
   713 endx = attribute endx {xsd:token {pattern = "[a-zA-Z]+"}}
       
   714 endy = attribute endy {xsd:token {pattern = "\d+"}}
   670 
   715 
   671 
   716 
   672 # =============================================================================
   717 # =============================================================================
   673 #                                 INLINE LEVEL
   718 #                                 INLINE LEVEL
   674 # =============================================================================
   719 # =============================================================================