comparison tests/treeDyn.ur @ 1457:aa2398e58306

Escape less-than in JavaScript strings
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 May 2011 17:14:13 -0400
parents
children
comparison
equal deleted inserted replaced
1456:d674fb9499c4 1457:aa2398e58306
1 table t : {Id : int, Parent : option int}
2
3 fun recurse (root : option int) =
4 queryX' (SELECT * FROM t WHERE {eqNullable' (SQL t.Parent) root})
5 (fn r =>
6 children <- recurse (Some r.T.Id);
7 (*s <- source False;*)
8 return <xml>
9 <dyn signal={(*v <- signal s;
10 if v then*)
11 return <xml><b>HI</b>{children}<b>BYE</b></xml>
12 (*else
13 return <xml/>*)}/>
14 </xml>)
15
16 fun main () =
17 x <- recurse None;
18 return <xml><body>{x}</body></xml>