view tests/testHtml.ur @ 15:6ebc2ca594b7

Sql.insertIfMissing and deleteByKey (partly from Ron de Bruijn)
author Adam Chlipala <adam@chlipala.net>
date Sun, 11 Dec 2011 14:04:34 -0500
parents 8eaaca74a64c
children
line wrap: on
line source
open Parse
open Html

val parser = format (b, i, a)

fun parse r =
    case parser r.Source of
        Failure s => error <xml>Bad HTML: {[s]}</xml>
      | Success x => return <xml><body>
        <h1>Here it is:</h1>

        {x}
      </body></xml>

fun main () = return <xml><body>
  <form> <textarea{#Source}/> <submit action={parse}/> </form>
</body></xml>