summaryrefslogtreecommitdiff
path: root/tests/normalizeTable.ur
blob: be16d93553ad54e007a5ccfbcf8563a068de2a80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
fun main () =
visible <- source True;
return
    <xml>
      <body>
	<section>
	  <h1>Static table</h1>
	  <table border=1>
	    <thead>
	      <tr>
		<th>Column 0</th>
		<th>Column 1</th>
	      </tr>
	    </thead>
	    <tbody>
	      <tr>
		<td>A</td>
		<td>B</td>
	      </tr>
	    </tbody>
	  </table>
	</section>

	<section>
	  <h1>Dynamic table</h1>
	  <table border=1>
	    <thead>
	      <tr>
		<th>Column 0</th>
		<th>Column 1</th>
	      </tr>
	    </thead>
	    <tbody>
	      <dyn signal={
		 visible <- signal visible;
		 return (if visible then
			     <xml>
			       <tr>
			       <td>A</td>
			       <td>B</td>
			       </tr>			       
			     </xml>
			 else
			     <xml></xml>)
	      }/>
	    </tbody>
	  </table>
	</section>
      </body>
    </xml>