--- a/RelaxNG/publiquiz.rnc mer. févr. 01 18:19:33 2012 +0100
+++ b/RelaxNG/publiquiz.rnc sam. févr. 04 14:44:39 2012 +0100
@@ -56,9 +56,9 @@
quiz.content =
component.head?,
instructions,
- (engine | composite)?,
+ (engine | composite),
help?,
- commentary?
+ answer?
# =============================================================================
@@ -84,46 +84,49 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ engine ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
engine =
- choices
- | blanks
+ choices-radio
+ | choices-check
+ | blanks-fill
+ | blanks-select
| point
| matching
| sort
+ | production
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-choices = element choices {
- (attribute type {"radio"}, choices.attributes, choices.radio.content)
- | (attribute type {"check"}, choices.attributes, choices.check.content)
-}
+choices-radio = element choices-radio {
+ choices.attributes, choices-radio.content }
+choices-check = element choices-check {
+ choices.attributes, choices-check.content }
choices.attributes =
shuffle.attribute?
shuffle.attribute = attribute shuffle { xsd:boolean }
-choices.radio.content =
+choices-radio.content =
choices.right
& choices.wrong+
-choices.check.content =
+choices-check.content =
(choices.right | choices.wrong)+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-blanks = element blanks {
- (attribute type {"fill"}, blanks.fill.attributes, blanks.fill.content)
- | (attribute type {"select"}, blanks.select.attributes, blanks.select.content)
-}
+blanks-fill = element blanks-fill {
+ blanks-fill.attributes, blanks-fill.content }
+blanks-select = element blanks-select {
+ blanks-select.attributes, blanks-select.content }
-blanks.fill.attributes =
+blanks-fill.attributes =
strict.attribute?
-blanks.select.attributes =
+blanks-select.attributes =
multiple.attribute?
strict.attribute = attribute strict { xsd:boolean }
multiple.attribute = attribute multiple { xsd:boolean }
-blanks.fill.content =
+blanks-fill.content =
(blanks.block+ | blanks.section+)
-blanks.select.content =
+blanks-select.content =
blanks.wrongs?,
(blanks.block+ | blanks.section+)
@@ -159,6 +162,10 @@
sort.item,
sort.item+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+production = element production { empty }
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ composite
@@ -183,11 +190,11 @@
(section+ | block+)?,
link*
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ commentary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-commentary = element commentary { commentary.content }
+answer = element answer { answer.content }
-commentary.content =
+answer.content =
(section+ | block+)?,
link*
@@ -396,7 +403,7 @@
blank.content =
text
- | (s+, help?, commentary?)
+ | (s+, help?, answer?)
# ~~~~~~ s
s = element s { s.content }