annotate tests/subforms.ur @ 758:8323c1beef2e

Subforms type-checks; lists urlified and unurlified
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 11:48:56 -0400
parents
children 67cd8326f743
rev   line source
adamc@758 1 fun handler' ls =
adamc@758 2 case ls of
adamc@758 3 Nil => <xml/>
adamc@758 4 | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml>
adamc@758 5
adamc@758 6 fun handler r = return <xml><body>
adamc@758 7 {[r.A]}, {handler' r.Sub}, {[r.C]}
adamc@758 8 </body></xml>
adamc@758 9
adamc@758 10 fun main () = return <xml><body>
adamc@758 11 <form>
adamc@758 12 <textbox{#A}/><br/>
adamc@758 13 <subforms{#Sub}>
adamc@758 14 <entry>
adamc@758 15 <textbox{#A}/><br/>
adamc@758 16 <textbox{#B}/><br/>
adamc@758 17 <textbox{#Sub}/><br/>
adamc@758 18 </entry>
adamc@758 19 </subforms>
adamc@758 20 <textbox{#C}/><br/>
adamc@758 21 <submit action={handler}/>
adamc@758 22 </form>
adamc@758 23 </body></xml>