RelaxNG/publiquiz.rnc
changeset 448 9bc794bf36b0
parent 442 e3341312dff7
child 450 fd645a45932e
--- a/RelaxNG/publiquiz.rnc	sam. sept. 23 18:04:05 2017 +0200
+++ b/RelaxNG/publiquiz.rnc	dim. nov. 26 15:37:05 2017 +0100
@@ -1,5 +1,3 @@
-# $Id$
-
 
 include "publidoc.rnc" {
    start = publiquiz
@@ -128,6 +126,7 @@
  | sort
  | categories
  | wordsearch
+ | flashcard
  | production
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -189,8 +188,8 @@
    (blanks-c.block+ | blanks-c.section+)
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-correct-line = element correct-line {
-   correct.attributes, correct.content }
+
+correct-line = element correct-line { correct.attributes, correct.content }
 
 correct.attributes = 
    remove-space.attribute?
@@ -317,6 +316,7 @@
    category.item*
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content }
 
 wordsearch.attributes =
@@ -343,6 +343,38 @@
 cell = element cell {cell.content}
 cell.content = xsd:token {pattern = "."}
    
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flashcard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ flashcard
+flashcard = element flashcard { flashcard.content }
+
+flashcard.content =
+   side1,
+   side2
+
+# ~~~~~~ side1
+side1 = element side1 { side1.content }
+
+side1.content =
+    section+ | block+
+
+# ~~~~~~ side2
+side2 = element side2 { side2.content }
+
+side2.content =
+    instructions?,
+    flashcard.engine,
+    help?,
+    answer?
+
+# ~~~~~~ flashcard.engine
+flashcard.engine =
+    choices-radio
+    | choices-check
+    | blanks-fill
+    | blanks-select
+    | sort
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 production = element production { production.content }