# HG changeset patch # User Patrick PIERRE <patrick.pierre@prismallia.fr> # Date 1343320533 -7200 # Node ID dd9b04a5483942f9bdcb4ddfab943ddec1b1dbca # Parent 9298d951459b9129a5512dafd0d95fed1fc352e1 Ajout des exercices de catégorie diff -r 9298d951459b -r dd9b04a54839 RelaxNG/Examples/Quiz/categories.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/categories.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Id$ --> +<publiquiz version="1.0"> + <quiz id="categories" xml:lang="fr"> + <head> + <title>Exercice de catégories</title> + </head> + + <instructions> + <p>Classez les verbes suivants par groupe verbal.</p> + </instructions> + + <categories> + <category> + <head> + <title>verbes du premier groupe</title> + </head> + <item>manger</item> + <item>chanter</item> + <item>se promener</item> + <item>rêver</item> + </category> + <category> + <head> + <title>verbes du deuxième groupe</title> + </head> + <item>finir</item> + <item>choisir</item> + <item>reussir</item> + </category> + <category> + <head> + <title>verbes du troisième groupe</title> + </head> + <item>partir</item> + <item>prendre</item> + <item>voir</item> + <item>cueillir</item> + </category> + </categories> + </quiz> +</publiquiz> diff -r 9298d951459b -r dd9b04a54839 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc jeu. juin 21 19:10:16 2012 +0200 +++ b/RelaxNG/publiquiz.rnc jeu. juil. 26 18:35:33 2012 +0200 @@ -92,6 +92,7 @@ | point | matching | sort + | categories | production # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -163,6 +164,29 @@ sort.item, sort.item+ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ categories +categories = element categories { categories.content } + +categories.content = + category, + category+ + +# ~~~~~~ category +category = element category { category.content } + +category.content = + category.head, + category.item* + +# ~~~~~~ category.head +category.head = element head { category.head.content } + +category.head.content = + title, + subtitle? + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production = element production { empty } @@ -349,6 +373,13 @@ sort.item.content = inlines +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ category.item +category.item = element item { category.item.content } + +category.item.content = inlines + # ============================================================================= # INLINE LEVEL diff -r 9298d951459b -r dd9b04a54839 Xxe/Css/publidoc.css --- a/Xxe/Css/publidoc.css jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Css/publidoc.css jeu. juil. 26 18:35:33 2012 +0200 @@ -222,7 +222,7 @@ content: "Document" " – ID = " text-field(attribute, "id", columns, 15, color, white) " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%, - values, "en\A fr\A fr-FR\A es", color, white); + values, "en\A fr\A es", color, white); } publidoc > topic[id]:before { content: add-attribute-button() " Topic" @@ -237,14 +237,14 @@ content: add-attribute-button() " Topic" " – ID = " text-field(attribute, "id", columns, 15, color, white) " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%, - values, "en\A fr\A fr-FR\A es", color, white); + values, "en\A fr\A es", color, white); } publidoc > topic[id][type][xml|lang]:before { content: "Topic" " – ID = " text-field(attribute, "id", columns, 15, color, white) " – Type = " text-field(attribute, type, columns, 10, color, white) " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%, - values, "en\A fr\A fr-FR\A es", color, white); + values, "en\A fr\A es", color, white); } publidoc > * { diff -r 9298d951459b -r dd9b04a54839 Xxe/Css/publiquiz.css --- a/Xxe/Css/publiquiz.css jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Css/publiquiz.css jeu. juil. 26 18:35:33 2012 +0200 @@ -65,7 +65,7 @@ content: "Document" " – ID = " text-field(attribute, "id", columns, 15, color, white) " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%, - values, "en\A fr\A fr-FR\A es", color, white); + values, "en\A fr\A es", color, white); } publiquiz > quiz[id]:before { content: add-attribute-button() " Quiz" @@ -75,7 +75,7 @@ content: "Quiz" " – ID = " text-field(attribute, "id", columns, 15, color, white) " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%, - values, "en\A fr\A fr-FR\A es", color, white); + values, "en\A fr\A es", color, white); } publiquiz > * { @@ -220,6 +220,12 @@ set-attribute-button(attribute, shuffle, unset-attribute, yes); } +/* categories ~~~~~~~~~~~~~~~~~~~~~~ */ + +categories:before { + content: insert-before-button() " Catégories"; +} + /* production ~~~~~~~~~~~~~~~~~~~~~~ */ production:before { @@ -258,7 +264,7 @@ help:before { margin-top: .5em; background-color: #ffffdd; - content: insert-before-button() insert-button() " Aide 2"; + content: insert-before-button() insert-button() " Aide "; } help, help > *:before, help > * { @@ -427,6 +433,26 @@ content: insert-same-after-button(icon, icon(right-half-disc)) "\A"; } +/* category ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +category { + display: block; + margin-bottom: .3em; +} + +category > head { + display: block; +} + +category > item { + margin-left: 1em; +} + +category:after { + color: #7f7f7f; + content: " " insert-same-after-button(); +} + /* Inline level ============================================================ */ diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publidoc_document.xml --- a/Xxe/Templates/publidoc_document.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publidoc_document.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publidoc version="1.0"> - <document xml:id="???" > + <document id="???" > <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publidoc_topic.xml --- a/Xxe/Templates/publidoc_topic.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publidoc_topic.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publidoc version="1.0"> - <topic xml:id="???"> + <topic id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_blanks-fill.xml --- a/Xxe/Templates/publiquiz_blanks-fill.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_blanks-fill.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_blanks-select.xml --- a/Xxe/Templates/publiquiz_blanks-select.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_blanks-select.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_categories.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Xxe/Templates/publiquiz_categories.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Id$ --> +<publiquiz version="1.0"> + <quiz id="???"> + <head> + <title></title> + </head> + + <instructions> + <p></p> + </instructions> + + <categories> + <category> + <head> + <title></title> + </head> + <item></item> + </category> + <category> + <head> + <title></title> + </head> + <item></item> + </category> + </categories> + </quiz> +</publiquiz> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_choices-check.xml --- a/Xxe/Templates/publiquiz_choices-check.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_choices-check.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_choices-radio.xml --- a/Xxe/Templates/publiquiz_choices-radio.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_choices-radio.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_composite.xml --- a/Xxe/Templates/publiquiz_composite.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_composite.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_matching.xml --- a/Xxe/Templates/publiquiz_matching.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_matching.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_point.xml --- a/Xxe/Templates/publiquiz_point.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_point.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_production.xml --- a/Xxe/Templates/publiquiz_production.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_production.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Id$ --> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/Templates/publiquiz_sort.xml --- a/Xxe/Templates/publiquiz_sort.xml jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/Templates/publiquiz_sort.xml jeu. juil. 26 18:35:33 2012 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Id$ --> <publiquiz version="1.0"> - <quiz xml:id="???"> + <quiz id="???"> <head> <title></title> </head> diff -r 9298d951459b -r dd9b04a54839 Xxe/publiquiz.xxe --- a/Xxe/publiquiz.xxe jeu. juin 21 19:10:16 2012 +0200 +++ b/Xxe/publiquiz.xxe jeu. juil. 26 18:35:33 2012 +0200 @@ -28,6 +28,8 @@ name="Exercice d'appariement"/> <template location="Templates/publiquiz_sort.xml" name="Exercice de tri"/> + <template location="Templates/publiquiz_categories.xml" + name="Exercice de catégories"/> <template location="Templates/publiquiz_production.xml" name="Exercice de production"/> <template location="Templates/publiquiz_composite.xml"