--- a/RelaxNG/publidoc.rnc sam. juin 11 18:01:26 2011 +0200
+++ b/RelaxNG/publidoc.rnc sam. juin 11 20:35:18 2011 +0200
@@ -216,9 +216,9 @@
# Block level
# =============================================================================
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-block = (parag | \list | speech | media)
+block = (parag | \list | table | speech | media)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -228,7 +228,7 @@
inlines
& link*
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ list
\list = element list { \list.content }
@@ -255,6 +255,68 @@
label.content = inlines
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+table = element table { table.content }
+
+table.content =
+ title?,
+ tgroup+,
+ caption?
+
+# ~~~~~~ tgroup
+tgroup = element tgroup { tgroup.attributes, tgroup.content }
+
+tgroup.content =
+ thead?,
+ tfoot?,
+ tbody
+
+tgroup.attributes =
+ cols.attribute
+ & align.attribute?
+ & colsep.attribute?
+ & rowsep.attribute?
+cols.attribute = attribute cols { xsd:positiveInteger }
+align.attribute = attribute align { "left" | "right" | "center" | "justify" }
+colsep.attribute = attribute colsep { "0" | "1" }
+rowsep.attribute = attribute rowsep { "0" | "1" }
+
+# ~~~~~~ thead, tfoot, tbody
+thead = element thead { thead.content }
+tfoot = element tfoot { tfoot.content }
+tbody = element tbody { tbody.content }
+
+thead.content =
+ row+
+tfoot.content =
+ row+
+tbody.content =
+ row+
+
+# ~~~~~~ row
+row = element row { row.attribute, row.content }
+
+row.attribute =
+ valign.attribute?
+valign.attribute = attribute valign { "top" | "middle" | "bottom" }
+
+row.content =
+ entry+
+
+# ~~~~~~ entry
+entry = element entry { entry.content }
+
+entry.content =
+ inlines
+ | parag+
+
+# ~~~~~~ caption
+caption = element caption { caption.content }
+
+caption.content =
+ parag+
+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ speech
@@ -282,25 +344,18 @@
media.content =
image+,
- media.caption?
-
-media.id.attribute = attribute id { xsd:NMTOKEN }
+ caption?
# ~~~~~~ image
image = element image { image.attributes, image.content }
image.attributes =
media.id.attribute
+media.id.attribute = attribute id { xsd:NMTOKEN }
image.content =
copyright?
-# ~~~~~~ caption
-media.caption = element caption { media.caption.content }
-
-media.caption.content =
- parag+
-
# ~~~~~~ copyright
copyright = element copyright { copyright.content }
@@ -381,7 +436,8 @@
note.label.attribute = attribute label { text }
note.content =
- parag+
+ inlines
+ | parag+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~