--- a/RelaxNG/publiquiz.rnc mer. nov. 16 19:14:50 2016 +0100
+++ b/RelaxNG/publiquiz.rnc jeu. janv. 26 11:17:12 2017 +0100
@@ -14,7 +14,8 @@
(division | topic | quiz)+
nowrap.content =
- inlines | blanks.inlines | blanks-m.inlines | pointing.inlines
+ inlines | blanks.inlines | blanks-m.inlines | blanks-c.inlines
+ | pointing.inlines
}
@@ -84,6 +85,8 @@
blanks.section = element section { section.attributes, blanks.section.content }
blanks-m.section = element section {
section.attributes, blanks-m.section.content }
+blanks-c.section = element section {
+ section.attributes, blanks-c.section.content }
pointing.section = element section {
section.attributes, pointing.section.content }
@@ -93,6 +96,9 @@
blanks-m.section.content =
section.head?,
(blanks-m.section+ | blanks-m.block+)
+blanks-c.section.content =
+ section.head?,
+ (blanks-c.section+ | blanks-c.block+)
pointing.section.content =
section.head?,
(pointing.section+ | pointing.block+)
@@ -109,10 +115,10 @@
| blanks-fill
| blanks-select
| blanks-media
+ | blanks-choices
| blanks-char
| pointing
| pointing-categories
- | pip
| matching
| sort
| categories
@@ -148,6 +154,8 @@
blanks-select.attributes, blanks-select.content }
blanks-media = element blanks-media {
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 }
@@ -174,6 +182,8 @@
blanks-media.content =
blanks-m.intruders?,
(blanks-m.block+ | blanks-m.section+)
+blanks-choices.content =
+ (blanks-c.block+ | blanks-c.section+)
blanks-char.attributes =
remove-space.attribute?
@@ -227,17 +237,6 @@
pointing-c.category.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-pip = element pip { pip.content }
-
-pip.content =
- pip.image
-
-pip.image = element image { image.attributes, pip.image.content }
-pip.image.content =
- pip.point+
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ matching
@@ -391,6 +390,9 @@
blanks-m.block = (
blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
| blanks-m.table | blanks-m.media)
+blanks-c.block = (
+ blanks-c.p | blanks-c.list | blanks-c.blockquote | blanks-c.speech
+ | blanks-c.table | blanks-c.media)
pointing.block = (
pointing.p | pointing.list | pointing.blockquote | pointing.speech
| pointing.table | media)
@@ -399,12 +401,15 @@
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 }
pointing.p = element p { pointing.p.content }
blanks.p.content =
blanks.inlines
blanks-m.p.content =
blanks-m.inlines
+blanks-c.p.content =
+ blanks-c.inlines
pointing.p.content =
pointing.inlines
@@ -418,6 +423,11 @@
}
blanks-m.list = element list {
block.head?,
+ ( (attribute type {"ordered"}?, blanks-m.item, blanks-m.item+)
+ | (attribute type {"glossary"}, item.glossary+) )
+}
+blanks-c.list = element list {
+ block.head?,
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
| (attribute type {"glossary"}, item.glossary+) )
}
@@ -429,7 +439,8 @@
# ~~~~~~ item
blanks.item = element item { blanks.item.content }
-blanks-m.item = element item { blanks.item.content }
+blanks-m.item = element item { blanks-m.item.content }
+blanks-c.item = element item { blanks-c.item.content }
pointing.item = element item { pointing.item.content }
blanks.item.content =
@@ -438,6 +449,9 @@
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+
@@ -448,6 +462,8 @@
blockquote.attributes, blanks.blockquote.content }
blanks-m.blockquote = element blockquote {
blockquote.attributes, blanks-m.blockquote.content }
+blanks-c.blockquote = element blockquote {
+ blockquote.attributes, blanks-c.blockquote.content }
pointing.blockquote = element blockquote {
blockquote.attributes, pointing.blockquote.content }
@@ -459,6 +475,10 @@
block.head?,
(blanks-m.p | speech | blanks-m.list)+,
attribution?
+blanks-c.blockquote.content =
+ block.head?,
+ (blanks-c.p | speech | blanks-c.list)+,
+ attribution?
pointing.blockquote.content =
block.head?,
(pointing.p | speech | pointing.list)+,
@@ -469,6 +489,7 @@
# ~~~~~~ speech
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 }
pointing.speech = element speech { pointing.speech.content }
blanks.speech.content =
@@ -479,6 +500,10 @@
blanks-m.speaker?,
stage?,
(blanks-m.p | blanks-m.blockquote)+
+blanks-c.speech.content =
+ blanks-c.speaker?,
+ stage?,
+ (blanks-c.p | blanks-c.blockquote)+
pointing.speech.content =
pointing.speaker?,
stage?,
@@ -487,10 +512,12 @@
# ~~~~~~ speaker
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 }
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
pointing.speaker.content = pointing.inlines
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -498,6 +525,7 @@
# ~~~~~~ table
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 }
pointing.table = element table { table.attributes, pointing.table.content }
blanks.table.content =
@@ -508,6 +536,10 @@
block.head?,
((thead?, blanks-m.tbody+) | blanks-m.tr+),
blanks-m.table.caption?
+blanks-c.table.content =
+ block.head?,
+ ((thead?, blanks-c.tbody+) | blanks-c.tr+),
+ blanks-c.table.caption?
pointing.table.content =
block.head?,
((thead?, pointing.tbody+) | pointing.tr+),
@@ -516,24 +548,30 @@
# ~~~~~~ tbody
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 }
pointing.tbody = element tbody { pointing.tbody.content }
blanks.tbody.content =
blanks.tr+
blanks-m.tbody.content =
blanks-m.tr+
+blanks-c.tbody.content =
+ blanks-c.tr+
pointing.tbody.content =
pointing.tr+
# ~~~~~~ tr
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 }
pointing.tr = element tr { tr.attributes, pointing.tr.content }
blanks.tr.content =
(blanks.td | blanks.th)+
blanks-m.tr.content =
(blanks-m.td | blanks-m.th)+
+blanks-c.tr.content =
+ (blanks-c.td | blanks-c.th)+
pointing.tr.content =
(pointing.td | pointing.th)+
@@ -542,6 +580,8 @@
blanks.th = element th { td.attributes, blanks.td.content }
blanks-m.td = element td { td.attributes, blanks-m.td.content }
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 }
pointing.td = element td { td.attributes, pointing.td.content }
pointing.th = element th { td.attributes, pointing.td.content }
@@ -551,6 +591,9 @@
blanks-m.td.content =
blanks-m.inlines
| (blanks-m.p | blanks-m.media)+
+blanks-c.td.content =
+ blanks-c.inlines
+ | (blanks-c.p | blanks-c.media)+
pointing.td.content =
pointing.inlines
| (pointing.p | media)+
@@ -558,6 +601,7 @@
# ~~~~~~ table.caption
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 }
pointing.table.caption = element caption { pointing.caption.content }
blanks.caption.content =
@@ -566,6 +610,9 @@
blanks-m.caption.content =
blanks-m.inlines
| (blanks-m.p | speech | blanks-m.list | blockquote)+
+blanks-c.caption.content =
+ blanks-c.inlines
+ | (blanks-c.p | speech | blanks-c.list | blockquote)+
pointing.caption.content =
pointing.inlines
| (pointing.p | speech | pointing.list | blockquote)+
@@ -575,6 +622,7 @@
# ~~~~~~ media
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 }
pointing.media = element media { media.attributes, pointing.media.content }
blanks.media.content =
@@ -587,6 +635,11 @@
(blanks-m.image | audio | video)+,
blanks-m.media.caption?,
link?
+blanks-c.media.content =
+ block.head?,
+ (image | audio | video)+,
+ blanks-c.media.caption?,
+ link?
pointing.media.content =
block.head?,
(image | audio | video)+,
@@ -629,6 +682,8 @@
caption.attributes, blanks.caption.content }
blanks-m.media.caption = element caption {
caption.attributes, blanks-m.caption.content }
+blanks-c.media.caption = element caption {
+ caption.attributes, blanks-c.caption.content }
pointing.media.caption = element caption {
caption.attributes, pointing.caption.content }
@@ -784,6 +839,38 @@
& blank-m*
}
+blanks-c.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*
+
+ & blank-c*
+}
+
pointing.inlines = mixed {
sup*
& sub*
@@ -816,7 +903,7 @@
& point*
}
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m, blank-c ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ blank
blank = element blank { blank.attributes, blank.content }
@@ -840,6 +927,16 @@
| image
| audio
| (s-m+, help?, answer?)
+
+# ~~~~~~ blank-c
+blank-c = element blank { blank-c.attributes, blank-c.content }
+
+blank-c.attributes = form.attribute?
+form.attribute = attribute form { 'radio' | 'check' }
+
+blank-c.content = (blank-c.right | blank-c.wrong)+, help?, answer?
+blank-c.right = element right { inlines }
+blank-c.wrong = element wrong { inlines }
# ~~~~~~ s
s = element s { s.content }
@@ -856,16 +953,9 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
point = element point { point.attributes, point.content }
-pip.point = element point { pip.point.attributes, point.content }
point.attributes =
point.ref.attribute?
-pip.point.attributes =
- point.ref.attribute?
- & x.attribute
- & y.attribute
- & w.attribute
- & h.attribute
point.ref.attribute = attribute ref {
"right" | "cat1" | "cat2" | "cat3" | "cat4" | "cat5" }