# HG changeset patch # User Patrick PIERRE # Date 1359915761 -3600 # Node ID 1f9fa4e74cd0389ebe5eebcae8d146821d9771da # Parent e9d1bb4692b5c0241a9fc3ec0dd2c49526b83889 Exercices avec images diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/chat.png Binary file RelaxNG/Examples/Quiz/Images/chat.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/chaton.png Binary file RelaxNG/Examples/Quiz/Images/chaton.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/choices-check_audioi01.png Binary file RelaxNG/Examples/Quiz/Images/choices-check_audioi01.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/choices-radioq02i01.jpg Binary file RelaxNG/Examples/Quiz/Images/choices-radioq02i01.jpg has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/couleuvre.png Binary file RelaxNG/Examples/Quiz/Images/couleuvre.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/elephant.png Binary file RelaxNG/Examples/Quiz/Images/elephant.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/elephanteau.png Binary file RelaxNG/Examples/Quiz/Images/elephanteau.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/hippocampe.png Binary file RelaxNG/Examples/Quiz/Images/hippocampe.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/lezard.png Binary file RelaxNG/Examples/Quiz/Images/lezard.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/lievre.png Binary file RelaxNG/Examples/Quiz/Images/lievre.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/lion.png Binary file RelaxNG/Examples/Quiz/Images/lion.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/lionceau.png Binary file RelaxNG/Examples/Quiz/Images/lionceau.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/loup.png Binary file RelaxNG/Examples/Quiz/Images/loup.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/lynx.png Binary file RelaxNG/Examples/Quiz/Images/lynx.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/ours.png Binary file RelaxNG/Examples/Quiz/Images/ours.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/ourson.png Binary file RelaxNG/Examples/Quiz/Images/ourson.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/rouge-gorge.png Binary file RelaxNG/Examples/Quiz/Images/rouge-gorge.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/tigre.png Binary file RelaxNG/Examples/Quiz/Images/tigre.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/Images/tigreau.png Binary file RelaxNG/Examples/Quiz/Images/tigreau.png has changed diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/categories_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/categories_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,38 @@ + + + + + + Exercice de catégories avec images + + + +

Classez les animaux suivants par mode de reproduction.

+
+ + + + + Mammifère + + + + + + + + Vivipare + + + + + + + Ovipare + + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/choices-check_audio.xml --- a/RelaxNG/Examples/Quiz/choices-check_audio.xml ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/Examples/Quiz/choices-check_audio.xml dim. févr. 03 19:22:41 2013 +0100 @@ -11,10 +11,10 @@ - - - - + + + + diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/composite.xml --- a/RelaxNG/Examples/Quiz/composite.xml ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/Examples/Quiz/composite.xml dim. févr. 03 19:22:41 2013 +0100 @@ -94,9 +94,9 @@

Associez les animaux avec leur catégorie.

-

oiseau

hirondelle

-

mammifère

baleine

-

reptile

couleuvre

+ oiseau hirondelle + mammifère baleine + reptile couleuvre
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/matching.xml --- a/RelaxNG/Examples/Quiz/matching.xml ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/Examples/Quiz/matching.xml dim. févr. 03 19:22:41 2013 +0100 @@ -12,20 +12,20 @@ -

On s'entend très bien.

-

On s'entend comme chien et chat.

+ On s'entend très bien. + On s'entend comme chien et chat.
-

On a perdu le contact.

-

On a gardé contact.

+ On a perdu le contact. + On a gardé contact.
-

On se chamaille souvent.

-

On ne se dispute jamais.

+ On se chamaille souvent. + On ne se dispute jamais.
-

On s’amuse comme des fous.

-

On est plutôt sérieux ensemble.

+ On s’amuse comme des fous. + On est plutôt sérieux ensemble.
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/matching_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/matching_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,36 @@ + + + + + + Exercice d'appariement avec images + + + +

Associez les petits avec leur parent.

+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/Examples/Quiz/sort_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/sort_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,20 @@ + + + + + + Exercice de tri avec image + + + +

Rangez les animaux pour réaliser une chaîne alimentaire.

+
+ + + sont mangés par + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/publiquiz.rnc dim. févr. 03 19:22:41 2013 +0100 @@ -155,12 +155,20 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~ matching matching = element matching { matching.content } matching.content = match, match+ +# ~~~~~~ match +match = element match { match.content } + +match.content = + match.item, + match.item + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sort = element sort { sort.attributes, sort.content } @@ -204,7 +212,11 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ composite -composite = element composite { composite.content } +composite = element composite { composite.attributes, composite.content } + +composite.attributes = + multipage.attribute? +multipage.attribute = attribute multipage { xsd:boolean } composite.content = subquiz, @@ -337,7 +349,6 @@ point.inlines | (p | media)+ - # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~ choices.right = element right { choices.right.content } @@ -345,8 +356,7 @@ choices.right.content = inlines - | ((p+ | image | (audio, image?)), help?, answer?) - + | ((p | image | (audio, image?) | video), help?, answer?) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.wrongs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -361,13 +371,13 @@ blanks.wrong.content = text -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ match ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (match) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -match = element match { match.content } +match.item = element item { match.item.content } -match.content = - (p | section), - (p | section) +match.item.content = + inlines + | (image | (audio, image?) | video) # ~~~~~~~~~~~~~~~~~~~~~~~~ (sort) comparison, item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -383,14 +393,17 @@ item.shuffle.attribute? item.shuffle.attribute = attribute shuffle { xsd:integer } -sort.item.content = inlines +sort.item.content = + inlines + | (image | (audio, image?) | video) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ category.item category.item = element item { category.item.content } -category.item.content = inlines +category.item.content = + inlines + | (image | (audio, image?) | video) # ============================================================================= diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc ven. févr. 01 19:21:20 2013 +0100 +++ b/RelaxNG/publiset.rnc dim. févr. 03 19:22:41 2013 +0100 @@ -131,6 +131,7 @@ composition.file.attributes = name.attribute + & path.attribute? & (xpath.attribute | xslt.attribute)? selection.file.attributes = name.attribute diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Css/publiquiz.css --- a/Xxe/Css/publiquiz.css ven. févr. 01 19:21:20 2013 +0100 +++ b/Xxe/Css/publiquiz.css dim. févr. 03 19:22:41 2013 +0100 @@ -261,7 +261,14 @@ /* composite ~~~~~~~~~~~~~~~~~~~~~~~ */ composite:before { - content: insert-before-button() " Composite"; + content: insert-before-button() + command-button(command, "putAttribute", parameter, "multipage true", icon, icon(plus-box)) + " Composite"; +} +composite[multipage]:before { + content: insert-before-button() + " Composite – multipage = " label(attribute, multipage, color, black) + set-attribute-button(attribute, multipage, unset-attribute, yes) } subquiz { @@ -316,6 +323,13 @@ /* Block level ============================================================= */ +/* image ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +right image, wrong image, item image { + content: concatenate("image('Images/", attr(id), ".png', -128, -96, smooth)"); + vertical-align: middle; +} + /* choices.right, choices.wrong ~~~~ */ choices-radio right:before, choices-radio wrong:before, @@ -407,21 +421,22 @@ match { display: block; margin-left: 24px; + margin-bottom: .8em; } -match > section:before, match > p:before { +match > item:before { display: none; } -match section, match p { +match item { display: inline; } -match > section:first-child:after, match > p:first-child:after { +match > item:first-child:after { color: #7f7f7f; content: " —> "; } -match > section:last-child:after, match > p:last-child:after { +match > item:last-child:after { display: none; } @@ -472,6 +487,7 @@ category > item { margin-left: 1em; + margin-bottom: 0.8em; } category:after { diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Templates/publiquiz_categories_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Xxe/Templates/publiquiz_categories_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,28 @@ + + + + + + + + + +

+
+ + + + + + + + + + + + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Templates/publiquiz_choices-radio_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Xxe/Templates/publiquiz_choices-radio_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,17 @@ + + + + + + + + +

+
+ + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Templates/publiquiz_matching.xml --- a/Xxe/Templates/publiquiz_matching.xml ven. févr. 01 19:21:20 2013 +0100 +++ b/Xxe/Templates/publiquiz_matching.xml dim. févr. 03 19:22:41 2013 +0100 @@ -11,12 +11,12 @@ -

-

+ +
-

-

+ +
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Templates/publiquiz_matching_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Xxe/Templates/publiquiz_matching_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,23 @@ + + + + + + + + +

+
+ + + + + + + + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/Templates/publiquiz_sort_image.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Xxe/Templates/publiquiz_sort_image.xml dim. févr. 03 19:22:41 2013 +0100 @@ -0,0 +1,19 @@ + + + + + + + + + +

+
+ + + + + + +
+
diff -r e9d1bb4692b5 -r 1f9fa4e74cd0 Xxe/publiquiz.xxe --- a/Xxe/publiquiz.xxe ven. févr. 01 19:21:20 2013 +0100 +++ b/Xxe/publiquiz.xxe dim. févr. 03 19:22:41 2013 +0100 @@ -16,6 +16,8 @@