# HG changeset patch # User Patrick PIERRE # Date 1360587539 -3600 # Node ID 416be14707c19a78a948ad278094b106d47f2d22 # Parent c0413c8aa3278bf5cff00f5e1867c90d37908c48 Ajout du mode 'multiple' diff -r c0413c8aa327 -r 416be14707c1 RelaxNG/Examples/Quiz/categories_multiple.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/categories_multiple.xml lun. févr. 11 13:58:59 2013 +0100 @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Id$ --> +<publiquiz version="1.0"> + <quiz id="categories_multiple" xml:lang="fr"> + <head> + <title>Exercice de catégories avec choix réutilisables</title> + </head> + + <instructions> + <section> + <p>Les moyens de transport peuvent être divisés en deux groupes :</p> + <list> + <item>ceux utilisés pour des courtes distances comme le parcours de + la ville ;</item> + <item>ceux utilisés principalement pour des longs voyages.</item> + </list> + </section> + </instructions> + + <categories multiple="true"> + <category> + <head> + <title>Courtes distances</title> + </head> + <item>barque</item> + <item>métro</item> + <item>bus</item> + <item>taxi</item> + <item>vélo</item> + <item>tramway</item> + <item>marche</item> + <item>camion</item> + </category> + + <category> + <head> + <title>Longs voyages</title> + </head> + <item>navire</item> + <item>avion</item> + <item>camion</item> + </category> + </categories> + </quiz> +</publiquiz> diff -r c0413c8aa327 -r 416be14707c1 RelaxNG/Examples/Quiz/matching_multiple.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/RelaxNG/Examples/Quiz/matching_multiple.xml lun. févr. 11 13:58:59 2013 +0100 @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Id$ --> +<publiquiz version="1.0"> + <quiz id="matching_multiple" xml:lang="fr"> + <head> + <title>Exercice d'appariement avec propositions réutilisables</title> + </head> + + <instructions> + <p>Conjuguez le verbe <mentioned>chanter</mentioned> à l'imparfait.</p> + </instructions> + + <matching multiple="true"> + <match> + <item>Je</item> + <item>chantais</item> + </match> + <match> + <item>Tu</item> + <item>chantais</item> + </match> + <match> + <item>Il/elle</item> + <item>chantait</item> + </match> + <match> + <item>Nous</item> + <item>chantions</item> + </match> + <match> + <item>Vous</item> + <item>chantiez</item> + </match> + <match> + <item>Ils/elles</item> + <item>chantaient</item> + </match> + </matching> + </quiz> +</publiquiz> diff -r c0413c8aa327 -r 416be14707c1 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc lun. févr. 11 13:18:31 2013 +0100 +++ b/RelaxNG/publiquiz.rnc lun. févr. 11 13:58:59 2013 +0100 @@ -156,7 +156,10 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ matching -matching = element matching { matching.content } +matching = element matching { matching.attributes, matching.content } + +matching.attributes = + multiple.attribute? matching.content = match,