Lecture overview -- Keyboard shortcut: 'u'  Previous page: Simple HTML recipe pages -- Keyboard shortcut: 'p'  Next page: Recipe abstractions on top of HTML -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Page 16 : 30
XML Processing in LAML
Recipe abstractions on top of HTML

Introducing simple Scheme functions on top of the HTML clauses

(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)))

The recipe function.

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

A call of the show-recipe function.

/user/normark/scheme/slides/goerlitz-05/xml-processing-in-laml/includes/recipes-html-abstr/recipes-abstracted.lamlThe entire document.

The entire document.

 

Poor markup - Use of positional parameters - Use of lists as generic markup