Commit ccaf60cc396f5b198efeccd5d123c67eb32ea143

Authored by totoro
1 parent b08b5acc

HTML_Partial_content can have HTML_Off_Form as argument

Showing 1 changed file with 40 additions and 7 deletions   Show diff stats
web/CXM_making_a_web_site.anubis
... ... @@ -1052,13 +1052,7 @@ public type HTML_Partial_Content:
1052 1052 )
1053 1053 .
1054 1054  
1055   -public define HTML_Partial_Content
1056   - partial_content
1057   - (
1058   - HTML_Off_Form content
1059   - )=
1060   - partial_content([], content).
1061   -
  1055 +
1062 1056 public define List(HTML_Head_Tag)
1063 1057 to_HTML_Head_Tag
1064 1058 (
... ... @@ -1493,6 +1487,45 @@ public define HTML_Row(HTML_In_Form)
1493 1487 anywhere in the page.
1494 1488  
1495 1489  
  1490 +public define HTML_Partial_Content
  1491 + partial_content
  1492 + (
  1493 + HTML_Off_Form content
  1494 + )=
  1495 + partial_content([], content).
  1496 +
  1497 +public define HTML_Partial_Content
  1498 + partial_content
  1499 + (
  1500 + List(HTML_Head_Tag) tags,
  1501 + HTML_Partial_Content p_content
  1502 + )=
  1503 + if p_content is partial_content(ptags, html) then
  1504 + partial_content(tags + ptags, html).
  1505 +
  1506 +define HTML_Partial_Content
  1507 + list_to_pcontent
  1508 + (
  1509 + List(HTML_Partial_Content) l_p_content,
  1510 + List(HTML_Head_Tag) so_far_tags,
  1511 + List(HTML_Off_Form) so_far_html
  1512 + )=
  1513 + if l_p_content is
  1514 + {
  1515 + [] then partial_content(so_far_tags, sequence(reverse(so_far_html))),
  1516 + [h . t] then
  1517 + //extract resurgent type and symbols of h
  1518 + if h is partial_content(tags, html) then
  1519 + list_to_pcontent(t, so_far_tags + tags, [html . so_far_html])
  1520 + }.
  1521 +
  1522 +public define HTML_Partial_Content
  1523 + partial_content
  1524 + (
  1525 + List(HTML_Partial_Content) l_p_content
  1526 + )=
  1527 + list_to_pcontent(l_p_content, [], []).
  1528 +
1496 1529  
1497 1530  
1498 1531 define String
... ...