--- a/RelaxNG/publiquiz.rnc jeu. janv. 26 11:17:12 2017 +0100
+++ b/RelaxNG/publiquiz.rnc jeu. mars 02 10:44:30 2017 +0100
@@ -87,6 +87,8 @@
section.attributes, blanks-m.section.content }
blanks-c.section = element section {
section.attributes, blanks-c.section.content }
+correct.section = element section {
+ section.attributes, correct.section.content }
pointing.section = element section {
section.attributes, pointing.section.content }
@@ -99,6 +101,9 @@
blanks-c.section.content =
section.head?,
(blanks-c.section+ | blanks-c.block+)
+correct.section.content =
+ section.head?,
+ (correct.section+ | correct.block+)
pointing.section.content =
section.head?,
(pointing.section+ | pointing.block+)
@@ -116,7 +121,7 @@
| blanks-select
| blanks-media
| blanks-choices
- | blanks-char
+ | correct-line
| pointing
| pointing-categories
| matching
@@ -156,8 +161,6 @@
blanks-select.attributes, blanks-media.content }
blanks-choices = element blanks-choices {
blanks-choices.content }
-blanks-char = element blanks-char {
- blanks-char.attributes, blanks-select.content }
blanks-fill.attributes =
success.attribute?
@@ -185,10 +188,18 @@
blanks-choices.content =
(blanks-c.block+ | blanks-c.section+)
-blanks-char.attributes =
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct-line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+correct-line = element correct-line {
+ correct.attributes, correct.content }
+
+correct.attributes =
remove-space.attribute?
remove-space.attribute = attribute remove-space { xsd:boolean }
+correct.content =
+ correct.intruders?,
+ (correct.block+ | correct.section+)
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pointing = element pointing { pointing.attributes, pointing.content }
@@ -393,6 +404,9 @@
blanks-c.block = (
blanks-c.p | blanks-c.list | blanks-c.blockquote | blanks-c.speech
| blanks-c.table | blanks-c.media)
+correct.block = (
+ correct.p | correct.list | correct.blockquote | correct.speech
+ | correct.table | media)
pointing.block = (
pointing.p | pointing.list | pointing.blockquote | pointing.speech
| pointing.table | media)
@@ -402,6 +416,7 @@
blanks.p = element p { blanks.p.content }
blanks-m.p = element p { blanks-m.p.content }
blanks-c.p = element p { blanks-c.p.content }
+correct.p = element p { correct.p.content }
pointing.p = element p { pointing.p.content }
blanks.p.content =
@@ -410,6 +425,8 @@
blanks-m.inlines
blanks-c.p.content =
blanks-c.inlines
+correct.p.content =
+ correct.inlines
pointing.p.content =
pointing.inlines
@@ -431,6 +448,11 @@
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
| (attribute type {"glossary"}, item.glossary+) )
}
+correct.list = element list {
+ block.head?,
+ ( (attribute type {"ordered"}?, correct.item, correct.item+)
+ | (attribute type {"glossary"}, item.glossary+) )
+}
pointing.list = element list {
block.head?,
( (attribute type {"ordered"}?, pointing.item, pointing.item+)
@@ -441,20 +463,15 @@
blanks.item = element item { blanks.item.content }
blanks-m.item = element item { blanks-m.item.content }
blanks-c.item = element item { blanks-c.item.content }
+correct.item = element item { correct.item.content }
pointing.item = element item { pointing.item.content }
+
-blanks.item.content =
- blanks.inlines
- | blanks.block+
-blanks-m.item.content =
- blanks-m.inlines
- | blanks-m.block+
-blanks-c.item.content =
- blanks-c.inlines
- | blanks-c.block+
-pointing.item.content =
- pointing.inlines
- | pointing.block+
+blanks.item.content = blanks.inlines | blanks.block+
+blanks-m.item.content = blanks-m.inlines | blanks-m.block+
+blanks-c.item.content = blanks-c.inlines | blanks-c.block+
+correct.item.content = correct.inlines | correct.block+
+pointing.item.content = pointing.inlines | pointing.block+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -464,6 +481,8 @@
blockquote.attributes, blanks-m.blockquote.content }
blanks-c.blockquote = element blockquote {
blockquote.attributes, blanks-c.blockquote.content }
+correct.blockquote = element blockquote {
+ blockquote.attributes, correct.blockquote.content }
pointing.blockquote = element blockquote {
blockquote.attributes, pointing.blockquote.content }
@@ -479,6 +498,10 @@
block.head?,
(blanks-c.p | speech | blanks-c.list)+,
attribution?
+correct.blockquote.content =
+ block.head?,
+ (correct.p | speech | correct.list)+,
+ attribution?
pointing.blockquote.content =
block.head?,
(pointing.p | speech | pointing.list)+,
@@ -490,6 +513,7 @@
blanks.speech = element speech { blanks.speech.content }
blanks-m.speech = element speech { blanks-m.speech.content }
blanks-c.speech = element speech { blanks-c.speech.content }
+correct.speech = element speech { correct.speech.content }
pointing.speech = element speech { pointing.speech.content }
blanks.speech.content =
@@ -504,6 +528,10 @@
blanks-c.speaker?,
stage?,
(blanks-c.p | blanks-c.blockquote)+
+correct.speech.content =
+ correct.speaker?,
+ stage?,
+ (correct.p | correct.blockquote)+
pointing.speech.content =
pointing.speaker?,
stage?,
@@ -513,11 +541,13 @@
blanks.speaker = element speaker { blanks.speaker.content }
blanks-m.speaker = element speaker { blanks-m.speaker.content }
blanks-c.speaker = element speaker { blanks-c.speaker.content }
+correct.speaker = element speaker { correct.speaker.content }
pointing.speaker = element speaker { pointing.speaker.content }
blanks.speaker.content = blanks.inlines
blanks-m.speaker.content = blanks-m.inlines
blanks-c.speaker.content = blanks-c.inlines
+correct.speaker.content = correct.inlines
pointing.speaker.content = pointing.inlines
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -526,6 +556,7 @@
blanks.table = element table { table.attributes, blanks.table.content }
blanks-m.table = element table { table.attributes, blanks-m.table.content }
blanks-c.table = element table { table.attributes, blanks-m.table.content }
+correct.table = element table { table.attributes, correct.table.content }
pointing.table = element table { table.attributes, pointing.table.content }
blanks.table.content =
@@ -540,6 +571,10 @@
block.head?,
((thead?, blanks-c.tbody+) | blanks-c.tr+),
blanks-c.table.caption?
+correct.table.content =
+ block.head?,
+ ((thead?, correct.tbody+) | correct.tr+),
+ correct.table.caption?
pointing.table.content =
block.head?,
((thead?, pointing.tbody+) | pointing.tr+),
@@ -549,6 +584,7 @@
blanks.tbody = element tbody { blanks.tbody.content }
blanks-m.tbody = element tbody { blanks-m.tbody.content }
blanks-c.tbody = element tbody { blanks-m.tbody.content }
+correct.tbody = element tbody { correct.tbody.content }
pointing.tbody = element tbody { pointing.tbody.content }
blanks.tbody.content =
@@ -557,6 +593,8 @@
blanks-m.tr+
blanks-c.tbody.content =
blanks-c.tr+
+correct.tbody.content =
+ correct.tr+
pointing.tbody.content =
pointing.tr+
@@ -564,6 +602,7 @@
blanks.tr = element tr { tr.attributes, blanks.tr.content }
blanks-m.tr = element tr { tr.attributes, blanks-m.tr.content }
blanks-c.tr = element tr { tr.attributes, blanks-c.tr.content }
+correct.tr = element tr { tr.attributes, correct.tr.content }
pointing.tr = element tr { tr.attributes, pointing.tr.content }
blanks.tr.content =
@@ -572,6 +611,8 @@
(blanks-m.td | blanks-m.th)+
blanks-c.tr.content =
(blanks-c.td | blanks-c.th)+
+correct.tr.content =
+ (correct.td | correct.th)+
pointing.tr.content =
(pointing.td | pointing.th)+
@@ -582,6 +623,8 @@
blanks-m.th = element th { td.attributes, blanks-m.td.content }
blanks-c.td = element td { td.attributes, blanks-c.td.content }
blanks-c.th = element th { td.attributes, blanks-c.td.content }
+correct.td = element td { td.attributes, correct.td.content }
+correct.th = element th { td.attributes, correct.td.content }
pointing.td = element td { td.attributes, pointing.td.content }
pointing.th = element th { td.attributes, pointing.td.content }
@@ -594,6 +637,9 @@
blanks-c.td.content =
blanks-c.inlines
| (blanks-c.p | blanks-c.media)+
+correct.td.content =
+ correct.inlines
+ | (correct.p | media)+
pointing.td.content =
pointing.inlines
| (pointing.p | media)+
@@ -602,6 +648,7 @@
blanks.table.caption = element caption { blanks.caption.content }
blanks-m.table.caption = element caption { blanks-m.caption.content }
blanks-c.table.caption = element caption { blanks-c.caption.content }
+correct.table.caption = element caption { correct.caption.content }
pointing.table.caption = element caption { pointing.caption.content }
blanks.caption.content =
@@ -613,6 +660,9 @@
blanks-c.caption.content =
blanks-c.inlines
| (blanks-c.p | speech | blanks-c.list | blockquote)+
+correct.caption.content =
+ correct.inlines
+ | (correct.p | speech | correct.list | blockquote)+
pointing.caption.content =
pointing.inlines
| (pointing.p | speech | pointing.list | blockquote)+
@@ -623,6 +673,7 @@
blanks.media = element media { media.attributes, blanks.media.content }
blanks-m.media = element media { media.attributes, blanks-m.media.content }
blanks-c.media = element media { media.attributes, blanks-c.media.content }
+correct.media = element media { media.attributes, correct.media.content }
pointing.media = element media { media.attributes, pointing.media.content }
blanks.media.content =
@@ -640,6 +691,11 @@
(image | audio | video)+,
blanks-c.media.caption?,
link?
+correct.media.content =
+ block.head?,
+ (image | audio | video)+,
+ correct.media.caption?,
+ link?
pointing.media.content =
block.head?,
(image | audio | video)+,
@@ -684,6 +740,8 @@
caption.attributes, blanks-m.caption.content }
blanks-c.media.caption = element caption {
caption.attributes, blanks-c.caption.content }
+correct.media.caption = element caption {
+ caption.attributes, correct.caption.content }
pointing.media.caption = element caption {
caption.attributes, pointing.caption.content }
@@ -704,6 +762,12 @@
blanks.intruders.content = blank+
blanks-m.intruders.content = blank-m+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ correct.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+correct.intruders = element intruders { correct.intruders.content }
+
+correct.intruders.content = char+
+
# ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~ matching.intruders
@@ -871,6 +935,38 @@
& blank-c*
}
+correct.inlines = mixed {
+ sup*
+ & sub*
+ & var*
+ & number*
+ & acronym*
+ & warning*
+
+ & highlight*
+ & emphasis*
+ & mentioned*
+ & literal*
+ & term*
+ & stage*
+ & name*
+ & foreign*
+ & date*
+ & math*
+ & quote*
+ & initial*
+ & note*
+ & link*
+ & anchor*
+ & index*
+ & image*
+ & audio*
+ & smil*
+ & nowrap*
+
+ & char*
+}
+
pointing.inlines = mixed {
sup*
& sub*
@@ -911,9 +1007,7 @@
blank.attributes =
area.attribute?
& long.attribute?
- & function.attribute?
area.attribute = attribute area { xsd:boolean }
-function.attribute = attribute function { 'accent' | 'uppercase' }
blank.content =
text
@@ -949,6 +1043,15 @@
| math
| image
| audio
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ char ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+char = element char { char.attributes, char.content }
+
+char.attributes = function.attribute?
+function.attribute = attribute function { "accent" | "uppercase" }
+
+char.content = text
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~