changeset 2007:d3a0f2b8af28

<thead>, <tbody>, <tfoot>
author Adam Chlipala <adam@chlipala.net>
date Wed, 30 Apr 2014 13:05:54 -0400
parents c3b03d099e04
children 93ff76058825
files lib/ur/basis.urs tests/thead.ur
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ur/basis.urs	Tue Apr 29 16:47:45 2014 -0400
+++ b/lib/ur/basis.urs	Wed Apr 30 13:05:54 2014 -0400
@@ -992,6 +992,16 @@
   -> tag ([Colspan = int, Rowspan = int] ++ tableAttrs)
          ([Tr] ++ other) ([Body] ++ other) [] []
 
+val thead : other ::: {Unit} -> [other ~ [Table]] => unit
+  -> tag tableAttrs
+         ([Table] ++ other) ([Table] ++ other) [] []
+val tbody : other ::: {Unit} -> [other ~ [Table]] => unit
+  -> tag tableAttrs
+         ([Table] ++ other) ([Table] ++ other) [] []
+val tfoot : other ::: {Unit} -> [other ~ [Table]] => unit
+  -> tag tableAttrs
+         ([Table] ++ other) ([Table] ++ other) [] []
+
 (** Definition lists *)
 
 val dl : other ::: {Unit} -> [other ~ [Body,Dl]]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/thead.ur	Wed Apr 30 13:05:54 2014 -0400
@@ -0,0 +1,16 @@
+fun main () : transaction page = return <xml><body>
+  <table>
+    <thead>
+      <tr> <th>A</th> <th>B</th> </tr>
+    </thead>
+
+    <tbody>
+      <tr> <td>1</td> <td>2</td> </tr>
+      <tr> <td>3</td> <td>4</td> </tr>
+    </tbody>
+
+    <tfoot>
+      <tr> <th>C</th> <th>D</th> </tr>
+    </tfoot>
+  </table>
+</body></xml>