RelaxNG/publiquiz.rnc
changeset 174 ca43d2c3a2c2
parent 169 416be14707c1
child 176 b1ce505b889d
--- a/RelaxNG/publiquiz.rnc	jeu. févr. 14 17:42:32 2013 +0100
+++ b/RelaxNG/publiquiz.rnc	mar. févr. 19 14:32:29 2013 +0100
@@ -193,6 +193,7 @@
    multiple.attribute?
    
 categories.content =
+   category.item*,
    category,
    category+
 
@@ -261,7 +262,7 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 blanks.block =
-   (blanks.p | speech | blanks.list | blockquote | blanks.table | media)
+   (blanks.p | speech | blanks.list | blockquote | blanks.table | blanks.media)
 point.block =
    (point.p | speech | point.list | blockquote | point.table | media)
 
@@ -355,6 +356,31 @@
    point.inlines
  | (p | media)+
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ blanks.media
+blanks.media = element media { blanksmedia.content }
+
+blanksmedia.content =
+   block.head?,
+   (blanks.image | audio | video)+,
+   media.caption?,
+   link?
+
+# ~~~~~~ blanks.image
+blanks.image = element image { image.attributes, blanks.image.content }
+
+blanks.image.content =
+   copyright?,
+   hotspot*,
+   blanks.tooltip*
+
+# ~~~~~~ blanks.tooltip
+blanks.tooltip = element tooltip { tooltip.attributes, blanks.tooltip.content }
+
+blanks.tooltip.content =
+   (p+ | image | blank)
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~ choices.right, choices.wrong ~~~~~~~~~~~~~~~~~~~~~~~
 
 choices.right = element right { choices.right.content }
@@ -435,6 +461,7 @@
  & term*
  & link*
  & anchor*
+ & image*
  & blank*
 }
 point.inlines = mixed {
@@ -454,6 +481,7 @@
  & term*
  & link*
  & anchor*
+ & image*
  & blank*
  & point.right*
  & point.wrong*