Back to slide -- Keyboard shortcut: 'u'              recipes-abstracted.laml - The entire document.Slide 16 : 30
Program 1

(load (string-append laml-dir "laml.scm"))
(laml-style "simple-xhtml1.0-transitional-validating")
(lib-load "xhtml1.0-convenience.scm")

(define laml-generation-meta (meta 'name "Generator" 'content "LAML"))
(define meta-props (list 'http-equiv "Content-Type" 'content "text/html; charset=iso-8859-1"))
(define html-props (list 'xmlns "http://www.w3.org/1999/xhtml"))

(define ttl "My Favorite Recipies")

; Poor recipe markup. Ordinary positional parameters. Pure lists. 
(define (recipe title ingredient-list step-list comment)
  (div 'css:margin-bottom "2cm"
     (span "Recipe:" title) (br)
     "Ingredients:" (br)
     (ul (map li ingredient-list))
     "Procedure:" (br)
     (ol (map li step-list))
     (font 'size "1" comment)))


(write-html '(pp prolog)
 (html html-props
  (head 
   (meta meta-props) laml-generation-meta
  (title ttl))
  (body 
    (h1 ttl)

    (recipe      
       "Pita Bread" 
       (list "1.5 tsp dry yeast" "1 cup water" "...")
       (list "Dissolve the yeast" "Add honey, flour and salt" "...") 
       "")      

    (recipe   
       "Apricot Compote" 
       (list "3 cups dried pears" "0.5 cups maple syrup" "...")
       (list "Cook the pears, suryp and water" "...") 
       (span "Tastes" (b "ugly") ))   
    
  )
 )
)


(end-laml)