--- /dev/null jeu. janv. 01 00:00:00 1970 +0000
+++ b/RelaxNG/publianim.rnc mar. mars 15 15:02:12 2016 +0100
@@ -0,0 +1,165 @@
+
+
+include "publidoc.rnc" {
+ start = publianim
+
+ image.attributes =
+ media.id.attribute
+ & image.type.attribute?
+ & image.zoom.attribute?
+ & alt.attribute?
+
+ image.zoom.attribute = attribute zoom {"true" | "false"}
+
+ media.image.content =
+ copyright?,
+ hotspot*
+
+ audio.attributes =
+ media.id.attribute
+ & audio.type?
+ audio.type = attribute type { "music" | "voice" | "fr" | "en"
+ | "background" | "smil" }
+
+
+ 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*
+ }
+
+}
+
+publianim = element publianim {
+ publianim.attributes,
+ publianim.content
+}
+
+publianim.attributes =
+ version.attribute
+
+publianim.content =
+ document
+ | top.topic
+
+
+# =============================================================================
+# BLOCK LEVEL
+# =============================================================================
+
+
+# ~~~~~~ hotspot
+# hotspot = element hotspot { hotspot.attributes, hotspot.content }
+
+# hotspot.attributes =
+# x.attribute
+# & y.attribute
+# & w.attribute
+# & h.attribute?
+# & hotspot.display.attribute?
+# & hotspot.type.attribute?
+# & xmlid.attribute?
+# x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
+# y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
+# w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
+# h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
+# hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" }
+# hotspot.type.attribute = attribute type { xsd:NCName }
+
+# hotspot.content =
+# ((link | p+ | image | audio | video), (spot, scenario?)?)
+# | (spot, scenario?)
+# | empty
+
+# ~~~~~~ spot
+# spot = element spot { spot.attributes, spot.content }
+
+# spot.attributes =
+# dx.attribute?
+# & dy.attribute?
+# & dw.attribute?
+# & dh.attribute?
+# dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
+# dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
+# dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
+# dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
+
+# spot.content =
+# ((p+ | image), audio?)
+# | audio
+# | video
+
+# ~~~~~~ media.caption
+# media.caption = element caption { caption.attributes, caption.content }
+
+# caption.attributes =
+# x.attribute?
+# & y.attribute?
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ scenario
+# scenario = element scenario { scenario.content }
+
+# scenario.content =
+# init*,
+# onclick*
+
+# ~~~~~~ init
+# init = element init { init.attributes }
+
+# init.attributes =
+# init.action.attribute
+# & target.attribute?
+# init.action.attribute = attribute action { "hide" }
+# target.attribute = attribute target { "hotspot" | "spot" }
+
+# ~~~~~~ onclick
+# onclick = element onclick { onclick.attributes }
+
+# onclick.attributes =
+# onclick.action.attribute
+# & target.attribute?
+# onclick.action.attribute = attribute action { "show" }
+
+
+# =============================================================================
+# INLINE LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# smil = element smil { smil.attributes, smil.content }
+
+# smil.attributes =
+# audio.attribute?
+# & begin.attribute?
+# & end.attribute?
+# audio.attribute = attribute audio { xsd:anyURI }
+# begin.attribute = attribute begin { xsd:decimal }
+# end.attribute = attribute end { xsd:decimal }
+
+# smil.content = inlines
--- a/RelaxNG/publiquiz.rnc lun. févr. 08 18:46:23 2016 +0100
+++ b/RelaxNG/publiquiz.rnc mar. mars 15 15:02:12 2016 +0100
@@ -79,12 +79,17 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blanks.section = element section { section.attributes, blanks.section.content }
+blanks-m.section = element section {
+ section.attributes, blanks-m.section.content }
pointing.section = element section {
section.attributes, pointing.section.content }
blanks.section.content =
section.head?,
(blanks.section+ | blanks.block+)
+blanks-m.section.content =
+ section.head?,
+ (blanks-m.section+ | blanks-m.block+)
pointing.section.content =
section.head?,
(pointing.section+ | pointing.block+)
@@ -100,9 +105,11 @@
| choices-check
| blanks-fill
| blanks-select
+ | blanks-media
| blanks-char
| pointing
| pointing-categories
+ | pip
| matching
| sort
| categories
@@ -136,6 +143,8 @@
blanks-fill.attributes, blanks-fill.content }
blanks-select = element blanks-select {
blanks-select.attributes, blanks-select.content }
+blanks-media = element blanks-media {
+ blanks-select.attributes, blanks-media.content }
blanks-char = element blanks-char {
blanks-char.attributes, blanks-select.content }
@@ -147,16 +156,21 @@
success.attribute?
& multiple.attribute?
& noshuffle.attribute?
+ & orientation.attribute?
strict.attribute = attribute strict { xsd:boolean }
multiple.attribute = attribute multiple { xsd:boolean }
noshuffle.attribute = attribute no-shuffle { xsd:boolean }
long.attribute = attribute long { xsd:positiveInteger }
+orientation.attribute = attribute orientation {"north"|"east"|"west"|"south"}
blanks-fill.content =
(blanks.block+ | blanks.section+)
blanks-select.content =
blanks.intruders?,
(blanks.block+ | blanks.section+)
+blanks-media.content =
+ blanks-m.intruders?,
+ (blanks-m.block+ | blanks-m.section+)
blanks-char.attributes =
remove-space.attribute?
@@ -210,6 +224,17 @@
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
@@ -218,6 +243,7 @@
matching.attributes =
success.attribute?
& multiple.attribute?
+ & orientation.attribute?
matching.content =
matching.intruders?,
@@ -238,6 +264,7 @@
sort.attributes =
success.attribute?
& shuffle.attribute?
+ & orientation.attribute?
sort.content =
comparison?,
@@ -261,6 +288,7 @@
success.attribute?
& multiple.attribute?
& noshuffle.attribute?
+ & orientation.attribute?
categories.content =
categories.intruders?,
@@ -281,6 +309,7 @@
mip.attributes =
success.attribute?
& multiple.attribute?
+ & orientation.attribute?
mip.content =
mip.image
@@ -340,6 +369,9 @@
blanks.block = (
blanks.p | blanks.list | blanks.blockquote | blanks.speech | blanks.table
| blanks.media)
+blanks-m.block = (
+ blanks-m.p | blanks-m.list | blanks-m.blockquote | blanks-m.speech
+ | blanks-m.table | blanks-m.media)
pointing.block = (
pointing.p | pointing.list | pointing.blockquote | pointing.speech
| pointing.table | media)
@@ -347,10 +379,13 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blanks.p = element p { blanks.p.content }
+blanks-m.p = element p { blanks-m.p.content }
pointing.p = element p { pointing.p.content }
blanks.p.content =
blanks.inlines
+blanks-m.p.content =
+ blanks-m.inlines
pointing.p.content =
pointing.inlines
@@ -362,6 +397,11 @@
( (attribute type {"ordered"}?, blanks.item, blanks.item+)
| (attribute type {"glossary"}, glossary.item+) )
}
+blanks-m.list = element list {
+ block.head?,
+ ( (attribute type {"ordered"}?, blanks.item, blanks.item+)
+ | (attribute type {"glossary"}, glossary.item+) )
+}
pointing.list = element list {
block.head?,
( (attribute type {"ordered"}?, pointing.item, pointing.item+)
@@ -370,11 +410,15 @@
# ~~~~~~ item
blanks.item = element item { blanks.item.content }
+blanks-m.item = element item { blanks.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+
pointing.item.content =
pointing.inlines
| pointing.block+
@@ -383,6 +427,8 @@
blanks.blockquote = element blockquote {
blockquote.attributes, blanks.blockquote.content }
+blanks-m.blockquote = element blockquote {
+ blockquote.attributes, blanks-m.blockquote.content }
pointing.blockquote = element blockquote {
blockquote.attributes, pointing.blockquote.content }
@@ -390,6 +436,10 @@
block.head?,
(blanks.p | speech | blanks.list)+,
attribution?
+blanks-m.blockquote.content =
+ block.head?,
+ (blanks-m.p | speech | blanks-m.list)+,
+ attribution?
pointing.blockquote.content =
block.head?,
(pointing.p | speech | pointing.list)+,
@@ -399,12 +449,17 @@
# ~~~~~~ speech
blanks.speech = element speech { blanks.speech.content }
+blanks-m.speech = element speech { blanks-m.speech.content }
pointing.speech = element speech { pointing.speech.content }
blanks.speech.content =
blanks.speaker?,
stage?,
(blanks.p | blanks.blockquote)+
+blanks-m.speech.content =
+ blanks-m.speaker?,
+ stage?,
+ (blanks-m.p | blanks-m.blockquote)+
pointing.speech.content =
pointing.speaker?,
stage?,
@@ -412,21 +467,28 @@
# ~~~~~~ speaker
blanks.speaker = element speaker { blanks.speaker.content }
+blanks-m.speaker = element speaker { blanks-m.speaker.content }
pointing.speaker = element speaker { pointing.speaker.content }
blanks.speaker.content = blanks.inlines
+blanks-m.speaker.content = blanks-m.inlines
pointing.speaker.content = pointing.inlines
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ table
blanks.table = element table { table.attributes, blanks.table.content }
+blanks-m.table = element table { table.attributes, blanks-m.table.content }
pointing.table = element table { table.attributes, pointing.table.content }
blanks.table.content =
block.head?,
((thead?, blanks.tbody+) | blanks.tr+),
blanks.table.caption?
+blanks-m.table.content =
+ block.head?,
+ ((thead?, blanks-m.tbody+) | blanks-m.tr+),
+ blanks-m.table.caption?
pointing.table.content =
block.head?,
((thead?, pointing.tbody+) | pointing.tr+),
@@ -434,42 +496,57 @@
# ~~~~~~ tbody
blanks.tbody = element tbody { blanks.tbody.content }
+blanks-m.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+
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 }
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)+
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 }
+blanks-m.td = element td { td.attributes, blanks-m.td.content }
+blanks-m.th = element th { td.attributes, blanks-m.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)+
+blanks-m.td.content =
+ blanks-m.inlines
+ | (blanks-m.p | blanks-m.media)+
pointing.td.content =
pointing.inlines
| (pointing.p | media)+
# ~~~~~~ table.caption
blanks.table.caption = element caption { blanks.caption.content }
+blanks-m.table.caption = element caption { blanks-m.caption.content }
pointing.table.caption = element caption { pointing.caption.content }
blanks.caption.content =
blanks.inlines
| (blanks.p | speech | blanks.list | blockquote)+
+blanks-m.caption.content =
+ blanks-m.inlines
+ | (blanks-m.p | speech | blanks-m.list | blockquote)+
pointing.caption.content =
pointing.inlines
| (pointing.p | speech | pointing.list | blockquote)+
@@ -478,6 +555,7 @@
# ~~~~~~ media
blanks.media = element media { media.attributes, blanks.media.content }
+blanks-m.media = element media { media.attributes, blanks-m.media.content }
pointing.media = element media { media.attributes, pointing.media.content }
blanks.media.content =
@@ -485,6 +563,11 @@
(blanks.image | audio | video)+,
blanks.media.caption?,
link?
+blanks-m.media.content =
+ block.head?,
+ (blanks-m.image | audio | video)+,
+ blanks-m.media.caption?,
+ link?
pointing.media.content =
block.head?,
(image | audio | video)+,
@@ -493,17 +576,23 @@
# ~~~~~~ blanks.image
blanks.image = element image { image.attributes, blanks.image.content }
+blanks-m.image = element image { image.attributes, blanks-m.image.content }
mip.image = element image { image.attributes, mip.image.content }
blanks.image.content =
copyright?,
blanks.dropzone*
+blanks-m.image.content =
+ copyright?,
+ blanks-m.dropzone*
mip.image.content =
mip.dropzone+
# ~~~~~~ dropzone
blanks.dropzone = element dropzone {
blanks.dropzone.attributes, blanks.dropzone.content }
+blanks-m.dropzone = element dropzone {
+ blanks.dropzone.attributes, blanks-m.dropzone.content }
mip.dropzone = element dropzone {
mip.dropzone.attributes, mip.dropzone.content }
@@ -518,6 +607,8 @@
blanks.dropzone.content =
blank
+blanks-m.dropzone.content =
+ blank-m
mip.dropzone.content =
image?,
audio?
@@ -525,6 +616,8 @@
# ~~~~~~ media.caption
blanks.media.caption = element caption {
caption.attributes, blanks.caption.content }
+blanks-m.media.caption = element caption {
+ caption.attributes, blanks-m.caption.content }
pointing.media.caption = element caption {
caption.attributes, pointing.caption.content }
@@ -537,12 +630,13 @@
inlines
| ((p | image | (audio, image?) | video), help?, answer?)
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blanks.intruders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~ blanks.intruders, blanks-m.intruders ~~~~~~~~~~~~~~~~~~
blanks.intruders = element intruders { blanks.intruders.content }
+blanks-m.intruders = element intruders { blanks-m.intruders.content }
-blanks.intruders.content =
- blank+
+blanks.intruders.content = blank+
+blanks-m.intruders.content = blank-m+
# ~~~~~~~~~~~~~~~~~~~~~~~ matching.intruders, match.item ~~~~~~~~~~~~~~~~~~~~~~
@@ -630,6 +724,37 @@
& blank*
}
+blanks-m.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*
+
+ & blank-m*
+}
+
pointing.inlines = mixed {
sup*
& sub*
@@ -661,7 +786,7 @@
& point*
}
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blank, blank-m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ blank
blank = element blank { blank.attributes, blank.content }
@@ -677,17 +802,32 @@
text
| (s+, help?, answer?)
+# ~~~~~~ blank-m
+blank-m = element blank { blank-m.content }
+blank-m.content = math | image | audio | s-m+
+
# ~~~~~~ s
s = element s { s.content }
+s.content = text
-s.content = text
+# ~~~~~~ s-m
+s-m = element s { s-m.content }
+s-m.content = math | image | audio
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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" }