RelaxNG/publiquiz.rnc
changeset 161 1f9fa4e74cd0
parent 160 e9d1bb4692b5
child 166 4e4c9b47f2a1
equal deleted inserted replaced
160:e9d1bb4692b5 161:1f9fa4e74cd0
   153 point.content =
   153 point.content =
   154    (point.section+ | point.block+)
   154    (point.section+ | point.block+)
   155 
   155 
   156 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   156 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   157 
   157 
       
   158 # ~~~~~~ matching
   158 matching = element matching { matching.content }
   159 matching = element matching { matching.content }
   159 
   160 
   160 matching.content =
   161 matching.content =
   161    match,
   162    match,
   162    match+
   163    match+
       
   164 
       
   165 # ~~~~~~ match
       
   166 match = element match { match.content }
       
   167 
       
   168 match.content =
       
   169    match.item,
       
   170    match.item
   163 
   171 
   164 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   172 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   165 
   173 
   166 sort = element sort { sort.attributes, sort.content }
   174 sort = element sort { sort.attributes, sort.content }
   167 
   175 
   202 production = element production { empty }
   210 production = element production { empty }
   203 
   211 
   204 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   212 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   205 
   213 
   206 # ~~~~~~ composite
   214 # ~~~~~~ composite
   207 composite = element composite { composite.content }
   215 composite = element composite { composite.attributes, composite.content }
       
   216 
       
   217 composite.attributes =
       
   218    multipage.attribute?
       
   219 multipage.attribute = attribute multipage { xsd:boolean } 
   208 
   220 
   209 composite.content =
   221 composite.content =
   210    subquiz,
   222    subquiz,
   211    subquiz+
   223    subquiz+
   212 
   224 
   335 
   347 
   336 point.entry.content =
   348 point.entry.content =
   337    point.inlines
   349    point.inlines
   338  | (p | media)+
   350  | (p | media)+
   339 
   351 
   340 
       
   341 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   352 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
   342 
   353 
   343 choices.right = element right { choices.right.content }
   354 choices.right = element right { choices.right.content }
   344 choices.wrong = element wrong { choices.right.content }
   355 choices.wrong = element wrong { choices.right.content }
   345 
   356 
   346 choices.right.content =
   357 choices.right.content =
   347    inlines
   358    inlines
   348  | ((p+ | image | (audio, image?)), help?, answer?)
   359  | ((p | image | (audio, image?) | video), help?, answer?)
   349 
       
   350 
   360 
   351 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   361 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   352 
   362 
   353 # ~~~~~~ blanks.wrongs
   363 # ~~~~~~ blanks.wrongs
   354 blanks.wrongs = element wrongs { blanks.wrongs.content }
   364 blanks.wrongs = element wrongs { blanks.wrongs.content }
   359 # ~~~~~~ blanks.wrong
   369 # ~~~~~~ blanks.wrong
   360 blanks.wrong = element wrong { blanks.wrong.content }
   370 blanks.wrong = element wrong { blanks.wrong.content }
   361 
   371 
   362 blanks.wrong.content = text
   372 blanks.wrong.content = text
   363 
   373 
   364 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ match ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   374 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   365 
   375 
   366 match = element match { match.content }
   376 match.item = element item { match.item.content }
   367 
   377 
   368 match.content =
   378 match.item.content =
   369    (p | section),
   379    inlines
   370    (p | section)
   380  | (image | (audio, image?) | video)
   371 
   381 
   372 # ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   382 # ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   373 
   383 
   374 # ~~~~~~ comparison
   384 # ~~~~~~ comparison
   375 comparison = element comparison { comparison.content }
   385 comparison = element comparison { comparison.content }
   381 
   391 
   382 sort.item.attributes =
   392 sort.item.attributes =
   383    item.shuffle.attribute?
   393    item.shuffle.attribute?
   384 item.shuffle.attribute = attribute shuffle { xsd:integer }
   394 item.shuffle.attribute = attribute shuffle { xsd:integer }
   385 
   395 
   386 sort.item.content = inlines
   396 sort.item.content =
       
   397    inlines
       
   398  | (image | (audio, image?) | video)
   387 
   399 
   388 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   400 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   389 
   401 
   390 # ~~~~~~ category.item
       
   391 category.item = element item { category.item.content }
   402 category.item = element item { category.item.content }
   392 
   403 
   393 category.item.content = inlines
   404 category.item.content =
       
   405    inlines
       
   406  | (image | (audio, image?) | video)
   394 
   407 
   395 
   408 
   396 # =============================================================================
   409 # =============================================================================
   397 #                                 INLINE LEVEL
   410 #                                 INLINE LEVEL
   398 # =============================================================================
   411 # =============================================================================