point -> pointing
authorPatrick PIERRE
mer., 22 oct. 2014 12:28:44 +0200
changeset 336 15beef04b08c
parent 335 b12500fa2400
child 337 fc5a30e23d0d
point -> pointing
Data/Quiz/point.xml
Data/Quiz/point_radio.xml
Data/Quiz/pointing-categories.xml
Data/Quiz/pointing.xml
Data/Quiz/pointing_radio.xml
RelaxNG/publiquiz.rnc
--- a/Data/Quiz/point.xml	lun. oct. 06 16:19:29 2014 +0200
+++ /dev/null	jeu. janv. 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Id$ -->
-<publiquiz version="1.0">
-  <quiz id="point" xml:lang="fr">
-    <head>
-      <title>Exercice de pointage</title>
-    </head>
-
-    <instructions>
-      <p>Sélectionnez le nom ou le pronom qui détermine l'accord de
-      chaque verbe mis en valeur.</p>
-    </instructions>
-
-    <point>
-      <section>
-        <p>Le centième <right>anniversaire</right> de la <wrong>mort</wrong> de
-        <wrong>Jules Verne</wrong> <highlight>a été célébré</highlight> en
-        2005. Cet <right>écrivain</right> du <number type="roman"
-        value="19">XIX</number><sup>e</sup> siècle <highlight>a</highlight>
-        encore aujourd'hui de nombreux <wrong>lecteurs</wrong>.
-        <right>Certains</right> le <highlight>considèrent</highlight> comme
-        l'<wrong>inventeur</wrong> du roman de science-fiction.</p>
-      </section>
-      <section>
-        <p>La <right>découverte</right> de la <wrong>Terre</wrong>
-        <highlight>est</highlight> le <wrong >thème</wrong> principal de ses
-        <wrong>romans</wrong>. Passionné de <wrong >géographie</wrong> et de
-        <wrong>sciences</wrong>, <right>Jules Verne</right> <highlight>a
-        imaginé</highlight> des <right>machines</right> extraordinaires qui
-        <highlight>permettent</highlight> d'explorer des
-        <wrong>contrées</wrong> lointaines ou inconnues. Ses
-        <right>héros</right> hors du commun <highlight>parcourent</highlight>
-        ainsi aussi bien les <wrong>profondeurs</wrong> sous-marines que
-        l'<wrong>espace</wrong> interstellaire.</p>
-      </section>
-    </point>
-    
-    <help>
-      <list>
-        <item>
-          Quand le sujet est un groupe nominal, le verbe s'accorde avec
-          le <highlight>nom noyau</highlight> du groupe.
-        </item>
-        <item>
-          Quand le sujet est le pronom relatif <mentioned>qui</mentioned>, le
-          verbe prend le nombre et la personne de
-          l'<highlight>antécédent</highlight>.
-        </item>
-      </list>
-    </help>
-  </quiz>
-</publiquiz>
--- a/Data/Quiz/point_radio.xml	lun. oct. 06 16:19:29 2014 +0200
+++ /dev/null	jeu. janv. 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Id$ -->
-<publiquiz version="1.0">
-  <quiz id="point_radio" xml:lang="fr">
-    <head>
-      <title>Exercice de pointage radio</title>
-    </head>
-
-    <instructions>
-      <section>
-        <p>Désignez Le mot qui représente le substantif du verbe.</p>
-      </section>
-    </instructions>
-
-    <point type="radio">
-      <p>
-        Changer :
-        <wrong>changage</wrong> / <right>changement</right> / <wrong>changation</wrong>
-      </p>
-    </point>
-  </quiz>
-</publiquiz>
--- /dev/null	jeu. janv. 01 00:00:00 1970 +0000
+++ b/Data/Quiz/pointing-categories.xml	mer. oct. 22 12:28:44 2014 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<publiquiz version="1.0">
+  <quiz id="pointing-categories" xml:lang="fr">
+    <head>
+      <title>Exercice de pointage avec catégories</title>
+    </head>
+
+    <instructions>
+      <p>
+        Surligne les verbes avec la couleur correspondant à leur construction.
+      </p>
+    </instructions>
+
+    <pointing-categories>
+      <categories>
+        <categorie id="1">v. intransitif</categorie>
+        <categorie id="2">v. transitif direct</categorie>
+        <categorie id="3">v. transitif indirect</categorie>
+      </categories>
+
+      <section>
+        <citation>
+          <p>
+            L'oncle Jules <cat id="2">raconta</cat> ensuite avec un calme
+            héroïque la dangereuse épopée des chasseurs.
+          </p>
+          <p>
+            Surpisg par l'orage au fond des gorges, ils <cat id="3">avaient
+            échappé</cat> par miracle à la chute de rochers énormes qui <cat
+            id="1">tombaient</cat> sans cesse devant eux et derrière eux, puis
+            à la foudre, qui <cat id="2">avait fendu</cat> en deux le gros
+            noyer de la Petite Baume ; enfin, trempés, épuisés, et poursuivis
+            par un torrent qui <cat id="1">grossissait</cat> de minute en
+            minute, ils n'<cat id="2">avaient dû</cat> leur salut qu'à un
+            sprint désespéré, dont l'oncle Jules <cat id="2">avoua</cat> qu'il
+            se serait cru incapable.
+          </p>
+          <attribution>Marcel Pagnol, <name of="book">Le Château de ma
+          mère</name>.</attribution>
+        </citation>
+      </section>
+    </pointing-categories>
+  </quiz>
+</publiquiz>
--- /dev/null	jeu. janv. 01 00:00:00 1970 +0000
+++ b/Data/Quiz/pointing.xml	mer. oct. 22 12:28:44 2014 +0200
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<publiquiz version="1.0">
+  <quiz id="pointing" xml:lang="fr">
+    <head>
+      <title>Exercice de pointage</title>
+    </head>
+
+    <instructions>
+      <p>Sélectionnez le nom ou le pronom qui détermine l'accord de
+      chaque verbe mis en valeur.</p>
+    </instructions>
+
+    <pointing>
+      <section>
+        <p>Le centième <right>anniversaire</right> de la <wrong>mort</wrong> de
+        <wrong>Jules Verne</wrong> <highlight>a été célébré</highlight> en
+        2005. Cet <right>écrivain</right> du <number type="roman"
+        value="19">XIX</number><sup>e</sup> siècle <highlight>a</highlight>
+        encore aujourd'hui de nombreux <wrong>lecteurs</wrong>.
+        <right>Certains</right> le <highlight>considèrent</highlight> comme
+        l'<wrong>inventeur</wrong> du roman de science-fiction.</p>
+      </section>
+      <section>
+        <p>La <right>découverte</right> de la <wrong>Terre</wrong>
+        <highlight>est</highlight> le <wrong >thème</wrong> principal de ses
+        <wrong>romans</wrong>. Passionné de <wrong >géographie</wrong> et de
+        <wrong>sciences</wrong>, <right>Jules Verne</right> <highlight>a
+        imaginé</highlight> des <right>machines</right> extraordinaires qui
+        <highlight>permettent</highlight> d'explorer des
+        <wrong>contrées</wrong> lointaines ou inconnues. Ses
+        <right>héros</right> hors du commun <highlight>parcourent</highlight>
+        ainsi aussi bien les <wrong>profondeurs</wrong> sous-marines que
+        l'<wrong>espace</wrong> interstellaire.</p>
+      </section>
+    </pointing>
+    
+    <help>
+      <list>
+        <item>
+          Quand le sujet est un groupe nominal, le verbe s'accorde avec
+          le <highlight>nom noyau</highlight> du groupe.
+        </item>
+        <item>
+          Quand le sujet est le pronom relatif <mentioned>qui</mentioned>, le
+          verbe prend le nombre et la personne de
+          l'<highlight>antécédent</highlight>.
+        </item>
+      </list>
+    </help>
+  </quiz>
+</publiquiz>
--- /dev/null	jeu. janv. 01 00:00:00 1970 +0000
+++ b/Data/Quiz/pointing_radio.xml	mer. oct. 22 12:28:44 2014 +0200
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<publiquiz version="1.0">
+  <quiz id="pointing_radio" xml:lang="fr">
+    <head>
+      <title>Exercice de pointage radio</title>
+    </head>
+
+    <instructions>
+      <section>
+        <p>Désignez Le mot qui représente le substantif du verbe.</p>
+      </section>
+    </instructions>
+
+    <pointing type="radio">
+      <p>
+        Changer :
+        <wrong>changage</wrong> / <right>changement</right> / <wrong>changation</wrong>
+      </p>
+    </pointing>
+  </quiz>
+</publiquiz>
--- a/RelaxNG/publiquiz.rnc	lun. oct. 06 16:19:29 2014 +0200
+++ b/RelaxNG/publiquiz.rnc	mer. oct. 22 12:28:44 2014 +0200
@@ -78,14 +78,15 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 blanks.section = element section { section.attributes, blanks.section.content }
-point.section = element section { section.attributes, point.section.content }
+pointing.section = element section {
+   section.attributes, pointing.section.content }
 
 blanks.section.content =
    section.head?,
    (blanks.section+ | blanks.block+)
-point.section.content =
+pointing.section.content =
    section.head?,
-   (point.section+ | point.block+)
+   (pointing.section+ | pointing.block+)
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -99,7 +100,8 @@
  | blanks-fill
  | blanks-select
  | blanks-char
- | point
+ | pointing
+ | pointing-categories
  | matching
  | sort
  | categories
@@ -144,17 +146,49 @@
    blanks.wrongs?,
    (blanks.block+ | blanks.section+)
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-point = element point { point.attributes, point.content }
+pointing = element pointing { pointing.attributes, pointing.content }
 
-point.attributes =
-   point.type.attribute?
-point.type.attribute = attribute type {
-   "radio" | "radio_button" | "check" | "check_button" }
+pointing.attributes =
+   pointing.type.attribute?
+pointing.type.attribute = attribute type { "radio" | "check" }
 
-point.content =
-   (point.section+ | point.block+)
+pointing.content =
+   (pointing.section+ | pointing.block+)
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing-categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ pointing-categories
+pointing-categories = element pointing-categories { pointing-c.content }
+
+pointing-c.content =
+   pointing-c.categories,
+   pointing.section
+
+# ~~~~~~ pointing-c.categories
+pointing-c.categories = element categories { pointing-c.categories.content }
+
+pointing-c.categories.content =
+   pointing-c.category1,
+   pointing-c.category2,
+   (pointing-c.category3,
+      (pointing-c.category4, pointing-c.category5?)?)?
+
+# ~~~~~~ pointing-c.categoryN
+pointing-c.category1 = element category {
+   attribute id { "1" }, pointing-c.category.content }
+pointing-c.category2 = element category {
+   attribute id { "2" }, pointing-c.category.content }
+pointing-c.category3 = element category {
+   attribute id { "3" }, pointing-c.category.content }
+pointing-c.category4 = element category {
+   attribute id { "4" }, pointing-c.category.content }
+pointing-c.category5 = element category {
+   attribute id { "5" }, pointing-c.category.content }
+
+pointing-c.category.content = inlines
+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -277,18 +311,19 @@
 blanks.block = (
    blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
  | blanks.media)
-point.block = (
-   point.p | point.list | point.blockquote | point.speech | point.table | media)
+pointing.block = (
+   pointing.p | pointing.list | pointing.blockquote | pointing.speech
+ | pointing.table | media)
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 blanks.p = element p { blanks.p.content }
-point.p = element p { point.p.content }
+pointing.p = element p { pointing.p.content }
 
 blanks.p.content =
    blanks.inlines
-point.p.content =
-   point.inlines
+pointing.p.content =
+   pointing.inlines
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -298,135 +333,135 @@
    (  (attribute type {"ordered"}?, blanks.item, blanks.item+)
     | (attribute type {"glossary"}, glossary.item+) )
 }
-point.list = element list {
+pointing.list = element list {
    block.head?,
-   (  (attribute type {"ordered"}?, point.item, point.item+)
+   (  (attribute type {"ordered"}?, pointing.item, pointing.item+)
     | (attribute type {"glossary"}, glossary.item+) )
 }
 
 # ~~~~~~ item
 blanks.item = element item { blanks.item.content }
-point.item = element item { point.item.content }
+pointing.item = element item { pointing.item.content }
 
 blanks.item.content =
    blanks.inlines
  | blanks.block+
-point.item.content =
-   point.inlines
- | point.block+
+pointing.item.content =
+   pointing.inlines
+ | pointing.block+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 blanks.blockquote = element blockquote {
    blockquote.attributes, blanks.blockquote.content }
-point.blockquote = element blockquote {
-   blockquote.attributes, point.blockquote.content }
+pointing.blockquote = element blockquote {
+   blockquote.attributes, pointing.blockquote.content }
 
 blanks.blockquote.content =
    block.head?,
    (blanks.p | speech | blanks.list)+,
    attribution?
-point.blockquote.content =
+pointing.blockquote.content =
    block.head?,
-   (point.p | speech | point.list)+,
+   (pointing.p | speech | pointing.list)+,
    attribution?
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ speech
 blanks.speech = element speech { blanks.speech.content }
-point.speech = element speech { point.speech.content }
+pointing.speech = element speech { pointing.speech.content }
 
 blanks.speech.content =
    blanks.speaker?,
    stage?,
    (blanks.p | blanks.blockquote)+
-point.speech.content =
-   point.speaker?,
+pointing.speech.content =
+   pointing.speaker?,
    stage?,
-   (point.p | point.blockquote)+
+   (pointing.p | pointing.blockquote)+
 
 # ~~~~~~ speaker
 blanks.speaker = element speaker { blanks.speaker.content }
-point.speaker = element speaker { point.speaker.content }
+pointing.speaker = element speaker { pointing.speaker.content }
 
 blanks.speaker.content = blanks.inlines
-point.speaker.content = point.inlines
+pointing.speaker.content = pointing.inlines
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ table
 blanks.table = element table { table.attributes, blanks.table.content }
-point.table = element table { table.attributes, point.table.content }
+pointing.table = element table { table.attributes, pointing.table.content }
 
 blanks.table.content =
    block.head?,
    thead?,
    (blanks.tbody+ | blanks.tr+),
    blanks.table.caption?
-point.table.content =
+pointing.table.content =
    block.head?,
-   (point.tbody+ | point.tr+),
-   point.table.caption?
+   (pointing.tbody+ | pointing.tr+),
+   pointing.table.caption?
 
 # ~~~~~~ tbody
 blanks.tbody = element tbody { blanks.tbody.content }
-point.tbody = element tbody { point.tbody.content }
+pointing.tbody = element tbody { pointing.tbody.content }
 
 blanks.tbody.content =
    blanks.tr+
-point.tbody.content =
-   point.tr+
+pointing.tbody.content =
+   pointing.tr+
 
 # ~~~~~~ tr
 blanks.tr = element tr { tr.attributes, blanks.tr.content }
-point.tr = element tr { tr.attributes, point.tr.content }
+pointing.tr = element tr { tr.attributes, pointing.tr.content }
 
 blanks.tr.content =
   (blanks.td | blanks.th)+
-point.tr.content =
-  (point.td | point.th)+
+pointing.tr.content =
+  (pointing.td | pointing.th)+
 
 # ~~~~~~ td, th
 blanks.td = element td { td.attributes, blanks.td.content }
 blanks.th = element th { td.attributes, blanks.td.content }
-point.td = element td { td.attributes, point.td.content }
-point.th = element th { td.attributes, point.td.content }
+pointing.td = element td { td.attributes, pointing.td.content }
+pointing.th = element th { td.attributes, pointing.td.content }
 
 blanks.td.content =
    blanks.inlines
  | (blanks.p | blanks.media)+
 
-point.td.content =
-   point.inlines
- | (point.p | media)+
+pointing.td.content =
+   pointing.inlines
+ | (pointing.p | media)+
 
 # ~~~~~~ table.caption
 blanks.table.caption = element caption { blanks.caption.content }
-point.table.caption = element caption { point.caption.content }
+pointing.table.caption = element caption { pointing.caption.content }
 
 blanks.caption.content =
    blanks.inlines
  | (blanks.p | speech | blanks.list | blockquote)+
-point.caption.content =
-   point.inlines
- | (point.p | speech | point.list | blockquote)+
+pointing.caption.content =
+   pointing.inlines
+ | (pointing.p | speech | pointing.list | blockquote)+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ media
 blanks.media = element media { media.attributes, blanks.media.content }
-point.media = element media { media.attributes, point.media.content }
+pointing.media = element media { media.attributes, pointing.media.content }
 
 blanks.media.content =
    block.head?,
    (blanks.image | audio | video)+,
    blanks.media.caption?,
    link?
-point.media.content =
+pointing.media.content =
    block.head?,
    (image | audio | video)+,
-   point.media.caption?,
+   pointing.media.caption?,
    link?
 
 # ~~~~~~ blanks.image
@@ -462,8 +497,8 @@
 # ~~~~~~ media.caption
 blanks.media.caption = element caption {
    caption.attributes, blanks.caption.content }
-point.media.caption = element caption {
-   caption.attributes, point.caption.content }
+pointing.media.caption = element caption {
+   caption.attributes, pointing.caption.content }
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -559,7 +594,7 @@
  & blank*
 }
 
-point.inlines = mixed {
+pointing.inlines = mixed {
    sup*
  & sub*
  & var*
@@ -587,9 +622,7 @@
  & anchor*
  & index*
 
- & blank*
- & point.right*
- & point.wrong*
+ & point*
 }
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -610,9 +643,12 @@
 
 s.content = text
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~ point.right, point.wrong ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-point.right = element right { point.right.content }
-point.wrong = element wrong { point.right.content }
+point = element point { point.attributes, point.content }
 
-point.right.content = inlines
+point.attributes =
+   point.ref.attribute?
+point.value.attribute = attribute ref { "right" | "1" | "2" | "3" | "4" | "5" }
+
+point.content = simple.inlines