Lecture overview -- Keyboard shortcut: 'u'  Previous page: HTML mirror functions in LAML [Section] -- Keyboard shortcut: 'p'  Next page: Mirroring of HTML (1) -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Lecture 7 - Page 9 : 24
Functional Programming in Scheme
The HTML mirrors in LAML

We will here describe the HTML4.01 transitional and the XHTML mirrors in LAML. All the essential observations also hold for XML-in-LAML languages. The XHTML mirrors are made via the XML-in-LAML framework.

A HTML mirror in Scheme is a set of functions that in an accurate way makes the HTML elements of a particular HTML version available in Scheme

  • A one-to-one mapping of HTML elements to named functions in Scheme

  • Generates well-formed and valid HTML documents

  • Prevents accidental emission of '<', '>', and '&' as part of the textual contents

  • The mirror functions return abstract syntax trees which can be rendered as 'HTML text'

  • Supports optional pretty printing of the resulting HTML code

Not too many functions - not too few. You cannot by accident use a non-standard HTML element