# HG changeset patch # User Coraline MARKWITZ # Date 1477404561 -7200 # Node ID f4ab398400200e123e9a2f3c34078b58110fc941 # Parent ad751158803d8045052bfe6092c8a3a053b10736 ajout wordsearch diff -r ad751158803d -r f4ab39840020 Data/Quiz/wordsearch.xml --- /dev/null jeu. janv. 01 00:00:00 1970 +0000 +++ b/Data/Quiz/wordsearch.xml mar. oct. 25 16:09:21 2016 +0200 @@ -0,0 +1,49 @@ + + + + + Word Search (Tolkien Universe) + + +

Find the words of the list

+
+ + + Bilbo + Sindarin + Mount Doom + Mithrandir + Khuzdul + Thorin + Galadriel + Lonely Mountain + Ring + Orc + Elves + Gondor + Dwarves + Legolas + Maia + Goblin + Fellowship + + + MOODTNUOMSELKVJ + SARBEWRWVEKEHQZ + RXNIROHTTVLGUYV + NYJLNZUBXLSOZWM + TYYBAGLMUEPLDDC + GVPOTIQMVJCAUMS + GOBLINAIACGSLGI + YLONELYMOUNTAIN + KTKJWPIHSWOLLEF + PAKTDNYSINDARIN + NSEVRAWDCKLXKMQ + SAMBZJPRKESIMPJ + DPRODNOGJDWPPUO + RRIDNARHTIMSPNH + ABHOAILEIRDALAG + + +
+
diff -r ad751158803d -r f4ab39840020 RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc jeu. oct. 13 16:26:59 2016 +0200 +++ b/RelaxNG/publiquiz.rnc mar. oct. 25 16:09:21 2016 +0200 @@ -116,6 +116,7 @@ | matching | sort | categories + | wordsearch | production # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -245,6 +246,7 @@ matching.attributes = success.attribute? & multiple.attribute? + & noshuffle.attribute? & orientation.attribute? matching.content = @@ -304,6 +306,33 @@ category.head, category.item* +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wordsearch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +wordsearch = element wordsearch {wordsearch.attributes, wordsearch.content } + +wordsearch.attributes = + strict.attribute ? + & wordlist.attribute ? + +wordlist.attribute = attribute wordlist { "hidden" | "right" | "left" } + +wordsearch.content = + words + & grid + +# ~~~~~~ words +words = element words {words.content} +words.content = words.item+ + +# ~~~~~~ grid +grid = element grid {grid.content} +grid.content = line+ + +line = element line {line.content} +line.content = cell+ + +cell = element cell {cell.content} +cell.content = xsd:token {pattern = "."} + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production = element production { production.content } @@ -668,6 +697,22 @@ inlines | (p, help?, answer?) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ words.item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +words.item = element item {words.item.content, words.item.attributes } + +words.item.content = inlines + +words.item.attributes = + startx + & starty + & endx + & endy + +startx = attribute startx {xsd:token {pattern = "[a-zA-Z]+"}} +starty = attribute starty {xsd:token {pattern = "\d+"}} +endx = attribute endx {xsd:token {pattern = "[a-zA-Z]+"}} +endy = attribute endy {xsd:token {pattern = "\d+"}} + # ============================================================================= # INLINE LEVEL