blob: 2db2f67829a7be1045f51b75262648423e39240b (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
fun handler'' ls =
case ls of
Nil => <xml/>
| Cons (r, ls) => <xml><li>{[r.C]}</li>{handler'' ls}</xml>
fun handler' ls =
case ls of
Nil => <xml/>
| Cons (r, ls) => <xml><li>{[r.Sub.A]} <ul>{handler'' r.Sub.Sub2}</ul></li>{handler' ls}</xml>
fun handler r = return <xml><body>
{[r.A]}
<ul>{handler' r.Sub}</ul>
{[r.C]}<br/>
{[r.Sub2.A]}<br/>
{handler'' r.Sub2.Nested}
</body></xml>
fun main () = return <xml><body>
<form>
<textbox{#A}/><br/>
<subforms{#Sub}>
<entry>
<subform{#Sub}>
<textbox{#A}/><br/>
<subforms{#Sub2}>
<entry>
<textbox{#C}/><br/>
</entry>
<entry>
<textbox{#C}/><br/>
</entry>
</subforms>
</subform>
</entry>
<entry>
<subform{#Sub}>
<textbox{#A}/><br/>
<subforms{#Sub2}>
<entry>
<textbox{#C}/><br/>
</entry>
<entry>
<textbox{#C}/><br/>
</entry>
</subforms>
</subform>
</entry>
</subforms>
<textbox{#C}/><br/>
<subform{#Sub2}>
<textbox{#A}/><br/>
<subforms{#Nested}>
<entry>
<textbox{#C}/>
</entry>
</subforms>
</subform><br/>
<submit action={handler}/>
</form>
</body></xml>
|