--- a/RelaxNG/publiquiz.rnc lun. oct. 06 16:19:29 2014 +0200
+++ b/RelaxNG/publiquiz.rnc mer. oct. 22 12:28:44 2014 +0200
@@ -78,14 +78,15 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blanks.section = element section { section.attributes, blanks.section.content }
-point.section = element section { section.attributes, point.section.content }
+pointing.section = element section {
+ section.attributes, pointing.section.content }
blanks.section.content =
section.head?,
(blanks.section+ | blanks.block+)
-point.section.content =
+pointing.section.content =
section.head?,
- (point.section+ | point.block+)
+ (pointing.section+ | pointing.block+)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instructions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -99,7 +100,8 @@
| blanks-fill
| blanks-select
| blanks-char
- | point
+ | pointing
+ | pointing-categories
| matching
| sort
| categories
@@ -144,17 +146,49 @@
blanks.wrongs?,
(blanks.block+ | blanks.section+)
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-point = element point { point.attributes, point.content }
+pointing = element pointing { pointing.attributes, pointing.content }
-point.attributes =
- point.type.attribute?
-point.type.attribute = attribute type {
- "radio" | "radio_button" | "check" | "check_button" }
+pointing.attributes =
+ pointing.type.attribute?
+pointing.type.attribute = attribute type { "radio" | "check" }
-point.content =
- (point.section+ | point.block+)
+pointing.content =
+ (pointing.section+ | pointing.block+)
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pointing-categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ pointing-categories
+pointing-categories = element pointing-categories { pointing-c.content }
+
+pointing-c.content =
+ pointing-c.categories,
+ pointing.section
+
+# ~~~~~~ pointing-c.categories
+pointing-c.categories = element categories { pointing-c.categories.content }
+
+pointing-c.categories.content =
+ pointing-c.category1,
+ pointing-c.category2,
+ (pointing-c.category3,
+ (pointing-c.category4, pointing-c.category5?)?)?
+
+# ~~~~~~ pointing-c.categoryN
+pointing-c.category1 = element category {
+ attribute id { "1" }, pointing-c.category.content }
+pointing-c.category2 = element category {
+ attribute id { "2" }, pointing-c.category.content }
+pointing-c.category3 = element category {
+ attribute id { "3" }, pointing-c.category.content }
+pointing-c.category4 = element category {
+ attribute id { "4" }, pointing-c.category.content }
+pointing-c.category5 = element category {
+ attribute id { "5" }, pointing-c.category.content }
+
+pointing-c.category.content = inlines
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ matching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -277,18 +311,19 @@
blanks.block = (
blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
| blanks.media)
-point.block = (
- point.p | point.list | point.blockquote | point.speech | point.table | media)
+pointing.block = (
+ pointing.p | pointing.list | pointing.blockquote | pointing.speech
+ | pointing.table | media)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blanks.p = element p { blanks.p.content }
-point.p = element p { point.p.content }
+pointing.p = element p { pointing.p.content }
blanks.p.content =
blanks.inlines
-point.p.content =
- point.inlines
+pointing.p.content =
+ pointing.inlines
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -298,135 +333,135 @@
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
| (attribute type {"glossary"}, glossary.item+) )
}
-point.list = element list {
+pointing.list = element list {
block.head?,
- ( (attribute type {"ordered"}?, point.item, point.item+)
+ ( (attribute type {"ordered"}?, pointing.item, pointing.item+)
| (attribute type {"glossary"}, glossary.item+) )
}
# ~~~~~~ item
blanks.item = element item { blanks.item.content }
-point.item = element item { point.item.content }
+pointing.item = element item { pointing.item.content }
blanks.item.content =
blanks.inlines
| blanks.block+
-point.item.content =
- point.inlines
- | point.block+
+pointing.item.content =
+ pointing.inlines
+ | pointing.block+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blanks.blockquote = element blockquote {
blockquote.attributes, blanks.blockquote.content }
-point.blockquote = element blockquote {
- blockquote.attributes, point.blockquote.content }
+pointing.blockquote = element blockquote {
+ blockquote.attributes, pointing.blockquote.content }
blanks.blockquote.content =
block.head?,
(blanks.p | speech | blanks.list)+,
attribution?
-point.blockquote.content =
+pointing.blockquote.content =
block.head?,
- (point.p | speech | point.list)+,
+ (pointing.p | speech | pointing.list)+,
attribution?
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ speech
blanks.speech = element speech { blanks.speech.content }
-point.speech = element speech { point.speech.content }
+pointing.speech = element speech { pointing.speech.content }
blanks.speech.content =
blanks.speaker?,
stage?,
(blanks.p | blanks.blockquote)+
-point.speech.content =
- point.speaker?,
+pointing.speech.content =
+ pointing.speaker?,
stage?,
- (point.p | point.blockquote)+
+ (pointing.p | pointing.blockquote)+
# ~~~~~~ speaker
blanks.speaker = element speaker { blanks.speaker.content }
-point.speaker = element speaker { point.speaker.content }
+pointing.speaker = element speaker { pointing.speaker.content }
blanks.speaker.content = blanks.inlines
-point.speaker.content = point.inlines
+pointing.speaker.content = pointing.inlines
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ table
blanks.table = element table { table.attributes, blanks.table.content }
-point.table = element table { table.attributes, point.table.content }
+pointing.table = element table { table.attributes, pointing.table.content }
blanks.table.content =
block.head?,
thead?,
(blanks.tbody+ | blanks.tr+),
blanks.table.caption?
-point.table.content =
+pointing.table.content =
block.head?,
- (point.tbody+ | point.tr+),
- point.table.caption?
+ (pointing.tbody+ | pointing.tr+),
+ pointing.table.caption?
# ~~~~~~ tbody
blanks.tbody = element tbody { blanks.tbody.content }
-point.tbody = element tbody { point.tbody.content }
+pointing.tbody = element tbody { pointing.tbody.content }
blanks.tbody.content =
blanks.tr+
-point.tbody.content =
- point.tr+
+pointing.tbody.content =
+ pointing.tr+
# ~~~~~~ tr
blanks.tr = element tr { tr.attributes, blanks.tr.content }
-point.tr = element tr { tr.attributes, point.tr.content }
+pointing.tr = element tr { tr.attributes, pointing.tr.content }
blanks.tr.content =
(blanks.td | blanks.th)+
-point.tr.content =
- (point.td | point.th)+
+pointing.tr.content =
+ (pointing.td | pointing.th)+
# ~~~~~~ td, th
blanks.td = element td { td.attributes, blanks.td.content }
blanks.th = element th { td.attributes, blanks.td.content }
-point.td = element td { td.attributes, point.td.content }
-point.th = element th { td.attributes, point.td.content }
+pointing.td = element td { td.attributes, pointing.td.content }
+pointing.th = element th { td.attributes, pointing.td.content }
blanks.td.content =
blanks.inlines
| (blanks.p | blanks.media)+
-point.td.content =
- point.inlines
- | (point.p | media)+
+pointing.td.content =
+ pointing.inlines
+ | (pointing.p | media)+
# ~~~~~~ table.caption
blanks.table.caption = element caption { blanks.caption.content }
-point.table.caption = element caption { point.caption.content }
+pointing.table.caption = element caption { pointing.caption.content }
blanks.caption.content =
blanks.inlines
| (blanks.p | speech | blanks.list | blockquote)+
-point.caption.content =
- point.inlines
- | (point.p | speech | point.list | blockquote)+
+pointing.caption.content =
+ pointing.inlines
+ | (pointing.p | speech | pointing.list | blockquote)+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ media
blanks.media = element media { media.attributes, blanks.media.content }
-point.media = element media { media.attributes, point.media.content }
+pointing.media = element media { media.attributes, pointing.media.content }
blanks.media.content =
block.head?,
(blanks.image | audio | video)+,
blanks.media.caption?,
link?
-point.media.content =
+pointing.media.content =
block.head?,
(image | audio | video)+,
- point.media.caption?,
+ pointing.media.caption?,
link?
# ~~~~~~ blanks.image
@@ -462,8 +497,8 @@
# ~~~~~~ media.caption
blanks.media.caption = element caption {
caption.attributes, blanks.caption.content }
-point.media.caption = element caption {
- caption.attributes, point.caption.content }
+pointing.media.caption = element caption {
+ caption.attributes, pointing.caption.content }
# ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
@@ -559,7 +594,7 @@
& blank*
}
-point.inlines = mixed {
+pointing.inlines = mixed {
sup*
& sub*
& var*
@@ -587,9 +622,7 @@
& anchor*
& index*
- & blank*
- & point.right*
- & point.wrong*
+ & point*
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -610,9 +643,12 @@
s.content = text
-# ~~~~~~~~~~~~~~~~~~~~~~~~~ point.right, point.wrong ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ point ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-point.right = element right { point.right.content }
-point.wrong = element wrong { point.right.content }
+point = element point { point.attributes, point.content }
-point.right.content = inlines
+point.attributes =
+ point.ref.attribute?
+point.value.attribute = attribute ref { "right" | "1" | "2" | "3" | "4" | "5" }
+
+point.content = simple.inlines