RelaxNG/publiquiz.rnc
changeset 125 dd9b04a54839
parent 122 a0b8294a5a99
child 127 efce69890bfd
--- a/RelaxNG/publiquiz.rnc	jeu. juin 21 19:10:16 2012 +0200
+++ b/RelaxNG/publiquiz.rnc	jeu. juil. 26 18:35:33 2012 +0200
@@ -92,6 +92,7 @@
  | point
  | matching
  | sort
+ | categories
  | production
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ choices ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -163,6 +164,29 @@
    sort.item,
    sort.item+
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ categories
+categories = element categories { categories.content }
+
+categories.content =
+   category,
+   category+
+
+# ~~~~~~ category
+category = element category { category.content }
+
+category.content =
+   category.head,
+   category.item*
+   
+# ~~~~~~ category.head
+category.head = element head { category.head.content }
+
+category.head.content =
+   title,
+   subtitle?
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ production ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 production = element production { empty }
@@ -349,6 +373,13 @@
 
 sort.item.content = inlines
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (category) item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ category.item
+category.item = element item { category.item.content }
+
+category.item.content = inlines
+
 
 # =============================================================================
 #                                 INLINE LEVEL