add data example
authorCoraline MARKWITZ
jeu., 02 mars 2017 10:44:30 +0100
changeset 442 e3341312dff7
parent 441 2b94d6c7fe0c
child 443 1a11fdaf42a3
add data example
Data/Quiz/blanks-char.xml
Data/Quiz/blanks-choices.xml
Data/Quiz/correct-line.xml
RelaxNG/publiquiz.rnc
--- a/Data/Quiz/blanks-char.xml	jeu. janv. 26 11:17:12 2017 +0100
+++ /dev/null	jeu. janv. 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Id$ -->
-<publiquiz version="1.0">
-  <quiz id="blanks-char" xml:lang="fr">
-    <head>
-      <title>Exercice de positionnement de caractères</title>
-    </head>
-
-    <instructions>
-      <p>Retrouvez les phrases cachées et insérez la ponctuation et les
-      espaces manquants.</p>
-    </instructions>
-
-    <blanks-char remove-space="true">
-      <intruders>
-        <blank>?</blank>
-      </intruders>
-      <p><blank function="uppercase">L</blank>e petit chat est mort<blank>.</blank></p>
-      <p><blank function="uppercase">C</blank><blank>'</blank>est dommage<blank> ; </blank>mais quoi !</p>
-      <p><blank function="uppercase">U</blank>n Anneau pour les amener tous et dans les t<blank function="accent">é</blank>n<blank function="accent">è</blank>bres les lier<blank>.</blank></p>
-    </blanks-char>
-  </quiz>
-</publiquiz>
--- /dev/null	jeu. janv. 01 00:00:00 1970 +0000
+++ b/Data/Quiz/blanks-choices.xml	jeu. mars 02 10:44:30 2017 +0100
@@ -0,0 +1,58 @@
+<?xml version='1.0' encoding='utf-8'?>
+<publiquiz version="1.0">
+  <quiz id="choices-select" xml:lang="fr">
+    <head>
+      <title>Questionnaire dans le texte</title>
+    </head>
+    <instructions>
+      <section>
+        <p>Complète avec les mots qui conviennent.</p>
+      </section>
+    </instructions>
+    <blanks-choices>
+      <section>
+        <blockquote>
+          <head>
+            <title>Le Nautilus</title>
+          </head>
+          <p>Le capitaine Nemo se
+          <blank><right>leva</right><wrong>lève</wrong><wrong>levé</wrong></blank>. Je
+          le suivis. Une double porte, ménagée à l’arrière de la salle,
+          s’ouvrit, et j’entrai dans une chambre de dimension égale à celle que
+          je venais de quitter.</p>
+          <p>C’était une bibliothèque. De hauts meubles en palissandre noir,
+          incrustés de cuivres,
+          <blank><right>supportaient</right><wrong>supportés</wrong><wrong>supportait</wrong></blank>
+          sur leurs larges rayons un grand nombre de livres uniformément
+          <blank><right>reliés</right><wrong>reliaient</wrong><wrong>relié</wrong></blank>. Ils
+          suivaient le contour de la salle et se terminaient à leur partie
+          inférieure par de vastes divans, capitonnés de cuir marron, qui
+          offraient les courbes les plus confortables. De légers pupitres
+          mobiles, en s’écartant ou se rapprochant à volonté, permettaient d’y
+          poser le livre en lecture. Au centre se dressait une vaste table,
+          couverte de brochures, entre lesquelles
+          <blank><right>apparaissaient</right><wrong>apparaissé</wrong><wrong>apparaissent</wrong></blank>
+          quelques journaux déjà vieux. La lumière électrique inondait tout cet
+          harmonieux ensemble, et tombait de quatre globes dépolis à demi
+          engagés dans les volutes du plafond. Je
+          <blank><right>regardais</right><wrong>regardé</wrong><wrong>regardai</wrong></blank>
+          avec une admiration réelle cette salle si ingénieusement aménagée, et
+          je ne pouvais en croire mes yeux.</p>
+          <attribution>VERNE, Jules. Le Nautilus. In <emphasis>20 000 lieues sous les mers</emphasis></attribution>
+        </blockquote>
+      </section>
+    </blanks-choices>
+  </quiz>
+</publiquiz>
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	jeu. janv. 01 00:00:00 1970 +0000
+++ b/Data/Quiz/correct-line.xml	jeu. mars 02 10:44:30 2017 +0100
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<publiquiz version="1.0">
+  <quiz id="blanks-char" xml:lang="fr">
+    <head>
+      <title>Exercice de positionnement de caractères</title>
+    </head>
+
+    <instructions>
+      <p>Retrouvez les phrases cachées et insérez la ponctuation et les
+      espaces manquants.</p>
+    </instructions>
+
+    <correct-line remove-space="true">
+      <intruders>
+        <char>?</char>
+      </intruders>
+      <p><char function="uppercase">L</char>e petit chat est mort<char>.</char></p>
+      <p><char function="uppercase">C</char><char>'</char>est dommage<char> ; </char>mais quoi !</p>
+      <p><char function="uppercase">U</char>n Anneau pour les amener tous et dans les t<char function="accent">é</char>n<char function="accent">è</char>bres les lier<char>.</char></p>
+    </correct-line>
+  </quiz>
+</publiquiz>
--- a/RelaxNG/publiquiz.rnc	jeu. janv. 26 11:17:12 2017 +0100
+++ b/RelaxNG/publiquiz.rnc	jeu. mars 02 10:44:30 2017 +0100
@@ -87,6 +87,8 @@
    section.attributes, blanks-m.section.content }
 blanks-c.section = element section {
    section.attributes, blanks-c.section.content }
+correct.section = element section {
+   section.attributes, correct.section.content }
 pointing.section = element section {
    section.attributes, pointing.section.content }
 
@@ -99,6 +101,9 @@
 blanks-c.section.content =
    section.head?,
    (blanks-c.section+ | blanks-c.block+)
+correct.section.content =
+   section.head?,
+   (correct.section+ | correct.block+)
 pointing.section.content =
    section.head?,
    (pointing.section+ | pointing.block+)
@@ -116,7 +121,7 @@
  | blanks-select
  | blanks-media
  | blanks-choices
- | blanks-char
+ | correct-line
  | pointing
  | pointing-categories
  | matching
@@ -156,8 +161,6 @@
    blanks-select.attributes, blanks-media.content }
 blanks-choices = element blanks-choices {
    blanks-choices.content }
-blanks-char = element blanks-char {
-   blanks-char.attributes, blanks-select.content }
 
 blanks-fill.attributes =
    success.attribute?
@@ -185,10 +188,18 @@
 blanks-choices.content =
    (blanks-c.block+ | blanks-c.section+)
 
-blanks-char.attributes =
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+correct-line = element correct-line {
+   correct.attributes, correct.content }
+
+correct.attributes = 
    remove-space.attribute?
 remove-space.attribute = attribute remove-space { xsd:boolean }
 
+correct.content =
+   correct.intruders?,
+   (correct.block+ | correct.section+)
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 pointing = element pointing { pointing.attributes, pointing.content }
@@ -393,6 +404,9 @@
 blanks-c.block = (
    blanks-c.p | blanks-c.list | blanks-c.blockquote | blanks-c.speech
  | blanks-c.table | blanks-c.media)
+correct.block = (
+   correct.p | correct.list | correct.blockquote | correct.speech
+ | correct.table | media)
 pointing.block = (
    pointing.p | pointing.list | pointing.blockquote | pointing.speech
  | pointing.table | media)
@@ -402,6 +416,7 @@
 blanks.p = element p { blanks.p.content }
 blanks-m.p = element p { blanks-m.p.content }
 blanks-c.p = element p { blanks-c.p.content }
+correct.p = element p { correct.p.content }
 pointing.p = element p { pointing.p.content }
 
 blanks.p.content =
@@ -410,6 +425,8 @@
    blanks-m.inlines
 blanks-c.p.content =
    blanks-c.inlines
+correct.p.content =
+   correct.inlines
 pointing.p.content =
    pointing.inlines
 
@@ -431,6 +448,11 @@
    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
     | (attribute type {"glossary"}, item.glossary+) )
 }
+correct.list = element list {
+   block.head?,
+   (  (attribute type {"ordered"}?, correct.item, correct.item+)
+    | (attribute type {"glossary"}, item.glossary+) )
+}
 pointing.list = element list {
    block.head?,
    (  (attribute type {"ordered"}?, pointing.item, pointing.item+)
@@ -441,20 +463,15 @@
 blanks.item = element item { blanks.item.content }
 blanks-m.item = element item { blanks-m.item.content }
 blanks-c.item = element item { blanks-c.item.content }
+correct.item = element item { correct.item.content }
 pointing.item = element item { pointing.item.content }
+                        
 
-blanks.item.content =
-   blanks.inlines
- | blanks.block+
-blanks-m.item.content =
-   blanks-m.inlines
- | blanks-m.block+
-blanks-c.item.content =
-   blanks-c.inlines
- | blanks-c.block+
-pointing.item.content =
-   pointing.inlines
- | pointing.block+
+blanks.item.content = blanks.inlines | blanks.block+
+blanks-m.item.content = blanks-m.inlines | blanks-m.block+
+blanks-c.item.content = blanks-c.inlines | blanks-c.block+
+correct.item.content = correct.inlines | correct.block+
+pointing.item.content = pointing.inlines | pointing.block+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -464,6 +481,8 @@
    blockquote.attributes, blanks-m.blockquote.content }
 blanks-c.blockquote = element blockquote {
    blockquote.attributes, blanks-c.blockquote.content }
+correct.blockquote = element blockquote {
+   blockquote.attributes, correct.blockquote.content }
 pointing.blockquote = element blockquote {
    blockquote.attributes, pointing.blockquote.content }
 
@@ -479,6 +498,10 @@
    block.head?,
    (blanks-c.p | speech | blanks-c.list)+,
    attribution?
+correct.blockquote.content =
+   block.head?,
+   (correct.p | speech | correct.list)+,
+   attribution?
 pointing.blockquote.content =
    block.head?,
    (pointing.p | speech | pointing.list)+,
@@ -490,6 +513,7 @@
 blanks.speech = element speech { blanks.speech.content }
 blanks-m.speech = element speech { blanks-m.speech.content }
 blanks-c.speech = element speech { blanks-c.speech.content }
+correct.speech = element speech { correct.speech.content }
 pointing.speech = element speech { pointing.speech.content }
 
 blanks.speech.content =
@@ -504,6 +528,10 @@
    blanks-c.speaker?,
    stage?,
    (blanks-c.p | blanks-c.blockquote)+
+correct.speech.content =
+   correct.speaker?,
+   stage?,
+   (correct.p | correct.blockquote)+
 pointing.speech.content =
    pointing.speaker?,
    stage?,
@@ -513,11 +541,13 @@
 blanks.speaker = element speaker { blanks.speaker.content }
 blanks-m.speaker = element speaker { blanks-m.speaker.content }
 blanks-c.speaker = element speaker { blanks-c.speaker.content }
+correct.speaker = element speaker { correct.speaker.content }
 pointing.speaker = element speaker { pointing.speaker.content }
 
 blanks.speaker.content = blanks.inlines
 blanks-m.speaker.content = blanks-m.inlines
 blanks-c.speaker.content = blanks-c.inlines
+correct.speaker.content = correct.inlines
 pointing.speaker.content = pointing.inlines
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -526,6 +556,7 @@
 blanks.table = element table { table.attributes, blanks.table.content }
 blanks-m.table = element table { table.attributes, blanks-m.table.content }
 blanks-c.table = element table { table.attributes, blanks-m.table.content }
+correct.table = element table { table.attributes, correct.table.content }
 pointing.table = element table { table.attributes, pointing.table.content }
 
 blanks.table.content =
@@ -540,6 +571,10 @@
    block.head?,
    ((thead?, blanks-c.tbody+) | blanks-c.tr+),
    blanks-c.table.caption?
+correct.table.content =
+   block.head?,
+   ((thead?, correct.tbody+) | correct.tr+),
+   correct.table.caption?
 pointing.table.content =
    block.head?,
    ((thead?, pointing.tbody+) | pointing.tr+),
@@ -549,6 +584,7 @@
 blanks.tbody = element tbody { blanks.tbody.content }
 blanks-m.tbody = element tbody { blanks-m.tbody.content }
 blanks-c.tbody = element tbody { blanks-m.tbody.content }
+correct.tbody = element tbody { correct.tbody.content }
 pointing.tbody = element tbody { pointing.tbody.content }
 
 blanks.tbody.content =
@@ -557,6 +593,8 @@
    blanks-m.tr+
 blanks-c.tbody.content =
    blanks-c.tr+
+correct.tbody.content =
+   correct.tr+
 pointing.tbody.content =
    pointing.tr+
 
@@ -564,6 +602,7 @@
 blanks.tr = element tr { tr.attributes, blanks.tr.content }
 blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
 blanks-c.tr = element tr { tr.attributes, blanks-c.tr.content }
+correct.tr = element tr { tr.attributes, correct.tr.content }
 pointing.tr = element tr { tr.attributes, pointing.tr.content }
 
 blanks.tr.content =
@@ -572,6 +611,8 @@
   (blanks-m.td | blanks-m.th)+
 blanks-c.tr.content =
   (blanks-c.td | blanks-c.th)+
+correct.tr.content =
+  (correct.td | correct.th)+
 pointing.tr.content =
   (pointing.td | pointing.th)+
 
@@ -582,6 +623,8 @@
 blanks-m.th = element th { td.attributes, blanks-m.td.content }
 blanks-c.td = element td { td.attributes, blanks-c.td.content }
 blanks-c.th = element th { td.attributes, blanks-c.td.content }
+correct.td = element td { td.attributes, correct.td.content }
+correct.th = element th { td.attributes, correct.td.content }
 pointing.td = element td { td.attributes, pointing.td.content }
 pointing.th = element th { td.attributes, pointing.td.content }
 
@@ -594,6 +637,9 @@
 blanks-c.td.content =
    blanks-c.inlines
  | (blanks-c.p | blanks-c.media)+
+correct.td.content =
+   correct.inlines
+ | (correct.p | media)+
 pointing.td.content =
    pointing.inlines
  | (pointing.p | media)+
@@ -602,6 +648,7 @@
 blanks.table.caption = element caption { blanks.caption.content }
 blanks-m.table.caption = element caption { blanks-m.caption.content }
 blanks-c.table.caption = element caption { blanks-c.caption.content }
+correct.table.caption = element caption { correct.caption.content }
 pointing.table.caption = element caption { pointing.caption.content }
 
 blanks.caption.content =
@@ -613,6 +660,9 @@
 blanks-c.caption.content =
    blanks-c.inlines
  | (blanks-c.p | speech | blanks-c.list | blockquote)+
+correct.caption.content =
+   correct.inlines
+ | (correct.p | speech | correct.list | blockquote)+
 pointing.caption.content =
    pointing.inlines
  | (pointing.p | speech | pointing.list | blockquote)+
@@ -623,6 +673,7 @@
 blanks.media = element media { media.attributes, blanks.media.content }
 blanks-m.media = element media { media.attributes, blanks-m.media.content }
 blanks-c.media = element media { media.attributes, blanks-c.media.content }
+correct.media = element media { media.attributes, correct.media.content }
 pointing.media = element media { media.attributes, pointing.media.content }
 
 blanks.media.content =
@@ -640,6 +691,11 @@
    (image | audio | video)+,
    blanks-c.media.caption?,
    link?
+correct.media.content =
+   block.head?,
+   (image | audio | video)+,
+   correct.media.caption?,
+   link?
 pointing.media.content =
    block.head?,
    (image | audio | video)+,
@@ -684,6 +740,8 @@
    caption.attributes, blanks-m.caption.content }
 blanks-c.media.caption = element caption {
    caption.attributes, blanks-c.caption.content }
+correct.media.caption = element caption {
+   caption.attributes, correct.caption.content }
 pointing.media.caption = element caption {
    caption.attributes, pointing.caption.content }
 
@@ -704,6 +762,12 @@
 blanks.intruders.content = blank+
 blanks-m.intruders.content = blank-m+
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+correct.intruders = element intruders { correct.intruders.content }
+
+correct.intruders.content = char+
+
 # ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~~ matching.intruders
@@ -871,6 +935,38 @@
  & blank-c*
 }
 
+correct.inlines = mixed {
+   sup*
+ & sub*
+ & var*
+ & number*
+ & acronym*
+ & warning*
+
+ & highlight*
+ & emphasis*
+ & mentioned*
+ & literal*
+ & term*
+ & stage*
+ & name*
+ & foreign*
+ & date*
+ & math*
+ & quote*
+ & initial*
+ & note*
+ & link*
+ & anchor*
+ & index*
+ & image*
+ & audio*
+ & smil*
+ & nowrap*
+
+ & char*
+}
+
 pointing.inlines = mixed {
    sup*
  & sub*
@@ -911,9 +1007,7 @@
 blank.attributes =
    area.attribute?
  & long.attribute?
- & function.attribute?
 area.attribute = attribute area { xsd:boolean }
-function.attribute = attribute function { 'accent' | 'uppercase' }
 
 blank.content =
    text
@@ -949,6 +1043,15 @@
  | math
  | image
  | audio
+      
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ char ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+char = element char { char.attributes, char.content }
+
+char.attributes = function.attribute?
+function.attribute = attribute function { "accent" | "uppercase" }
+
+char.content = text
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~