Mercurial > urweb
diff lib/ur/basis.urs @ 1641:68429cfce8db
Redo HTML context classification, to keep regular <body> tags out of <table> and <tr>
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 20 Dec 2011 19:02:04 -0500 |
parents | 2b312f6d4007 |
children | c3627f317bfd |
line wrap: on
line diff
--- a/lib/ur/basis.urs Sun Dec 18 12:00:36 2011 -0500 +++ b/lib/ur/basis.urs Tue Dec 20 19:02:04 2011 -0500 @@ -662,24 +662,24 @@ xml ctx use1 bind -> xml ctx (use1 ++ use2) bind -con xhtml = xml [Html] +con html = [Html] +con head = [Head] +con body = [Dyn, Body] +con form = [Dyn, Body, Form] +con subform = [Dyn, Body, Subform] +con tabl = [Dyn, Table] +con tr = [Dyn, Tr] + +con xhtml = xml html con page = xhtml [] [] -con xbody = xml [Body] [] [] -con xtable = xml [Body, Table] [] [] -con xtr = xml [Body, Tr] [] [] -con xform = xml [Body, Form] [] [] +con xbody = xml body [] [] +con xtable = xml tabl [] [] +con xtr = xml tr [] [] +con xform = xml form [] [] (*** HTML details *) -con html = [Html] -con head = [Head] -con body = [Body] -con form = [Body, Form] -con subform = [Body, Subform] -con tabl = [Body, Table] -con tr = [Body, Tr] - type queryString val show_queryString : show queryString @@ -697,8 +697,8 @@ type id val fresh : transaction id -val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ body] => unit - -> tag [Signal = signal (xml (body ++ ctx) use bind)] (body ++ ctx) [] use bind +val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ [Dyn]] => unit + -> tag [Signal = signal (xml ([Dyn] ++ ctx) use bind)] ([Dyn] ++ ctx) [] use bind val head : unit -> tag [] html head [] [] val title : unit -> tag [] head [] [] [] @@ -763,7 +763,7 @@ Onload = transaction unit] ++ boxAttrs) val form : ctx ::: {Unit} -> bind ::: {Type} - -> [[Body, Form, Table] ~ ctx] => + -> [[Body, Form] ~ ctx] => option css_class -> xml ([Body, Form] ++ ctx) [] bind -> xml ([Body] ++ ctx) [] [] @@ -864,16 +864,16 @@ val tabl : other ::: {Unit} -> [other ~ [Body, Table]] => unit -> tag ([Border = int] ++ boxAttrs) - ([Body] ++ other) ([Body, Table] ++ other) [] [] -val tr : other ::: {Unit} -> [other ~ [Body, Table, Tr]] => unit + ([Body] ++ other) ([Table] ++ other) [] [] +val tr : other ::: {Unit} -> [other ~ [Table, Tr]] => unit -> tag tableAttrs - ([Body, Table] ++ other) ([Body, Tr] ++ other) [] [] + ([Table] ++ other) ([Tr] ++ other) [] [] val th : other ::: {Unit} -> [other ~ [Body, Tr]] => unit -> tag ([Colspan = int, Rowspan = int] ++ tableAttrs) - ([Body, Tr] ++ other) ([Body] ++ other) [] [] + ([Tr] ++ other) ([Body] ++ other) [] [] val td : other ::: {Unit} -> [other ~ [Body, Tr]] => unit -> tag ([Colspan = int, Rowspan = int] ++ tableAttrs) - ([Body, Tr] ++ other) ([Body] ++ other) [] [] + ([Tr] ++ other) ([Body] ++ other) [] [] (** Aborting *)