RelaxNG/publiquiz.rnc
changeset 249 88251c3ce4a9
parent 238 1e881598ecad
child 288 e89c967167bb
--- a/RelaxNG/publiquiz.rnc	sam. sept. 21 11:32:02 2013 +0200
+++ b/RelaxNG/publiquiz.rnc	sam. sept. 21 11:44:27 2013 +0200
@@ -316,63 +316,55 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-blanks.table = element table { blanks.table.content }
-point.table = element table { point.table.content }
+blanks.table = element table { table.attributes, blanks.table.content }
+point.table = element table { table.attributes, point.table.content }
 
 blanks.table.content =
    block.head?,
-   blanks.tgroup+,
+   thead?,
+   (blanks.tbody+ | blanks.tr+),
    table.caption?
 point.table.content =
    block.head?,
-   point.tgroup+,
+   (point.tbody+ | point.tr+),
    table.caption?
 
-# ~~~~~~ tgroup
-blanks.tgroup = element tgroup { tgroup.attributes, blanks.tgroup.content }
-point.tgroup = element tgroup { tgroup.attributes, point.tgroup.content }
-
-blanks.tgroup.content =
-   thead?,
-   blanks.tbody
-point.tgroup.content =
-   thead?,
-   point.tbody
-
 # ~~~~~~ tbody
-blanks.tbody = element tbody { tbody.attributes, blanks.tbody.content }
-point.tbody = element tbody { tbody.attributes, point.tbody.content }
+blanks.tbody = element tbody { blanks.tbody.content }
+point.tbody = element tbody { point.tbody.content }
 
 blanks.tbody.content =
-   blanks.row+
+   blanks.tr+
 point.tbody.content =
-   point.row+
+   point.tr+
 
-# ~~~~~~ row
-blanks.row = element row { row.attributes, blanks.row.content }
-point.row = element row { row.attributes, point.row.content }
+# ~~~~~~ tr
+blanks.tr = element tr { tr.attributes, blanks.tr.content }
+point.tr = element tr { tr.attributes, point.tr.content }
 
-blanks.row.content =
-  blanks.entry+
-point.row.content =
-  point.entry+
+blanks.tr.content =
+  (blanks.td | blanks.th)+
+point.tr.content =
+  (point.td | point.th)+
 
-# ~~~~~~ entry
-blanks.entry = element entry { blanks.entry.content }
-point.entry = element entry { point.entry.content }
+# ~~~~~~ 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 }
 
-blanks.entry.content =
+blanks.td.content =
    blanks.inlines
  | (p | media)+
 
-point.entry.content =
+point.td.content =
    point.inlines
  | (p | media)+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # ~~~~~~ blanks.media
-blanks.media = element media { blanksmedia.content }
+blanks.media = element media { media.attributes, blanksmedia.content }
 
 blanksmedia.content =
    block.head?,