Lecture overview
Keyboard shortcut: 'u'  Previous page
Keyboard shortcut: 'p'  Next page
Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide
Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Slide 9 : 42
Overall document abstractions

We introduce LAML by a simple abstraction on the overall HTML document structure

The example documents and programs are located in the directory includes/document-abstractions/

includes/document-abstractions/initial-document.htmlA very simple HTML document that illustrates the overall HTML document structure.

A very simple HTML document that illustrates the overall HTML document structure. It may, however, be tedious to write these tags for each and every small HTML page you have to produce.

includes/document-abstractions/doc0.lamlThe same document as an LAML expression.

The same document as an LAML expression. We see that the the shift from HTML to LAML is a matter of a few syntactical changes. Notice the use of the underscore character, which suppresses the insertion of white space. This document cannot be processed immediately. However, the next version that we show can.

includes/document-abstractions/doc1.lamlThe document from above embedded in the LAML framework.

The document from above embedded in the LAML framework. Besides initial loading, we see the imperative writing of the functionally generated document to a specific target file. The if the source file is doc1.laml, the target file will be doc1.html.

includes/document-abstractions/doc2.lamlThe document from above abstracted with the procedure www-document.

The document from above abstracted with the procedure www-document. We also show the definition of www-document, which typically will be moved to some LAML library for general use. By the way, the LAML libraries already has similar procedures, such as generic-page in the style simple-html4.0-loose.

includes/document-abstractions/doc3.lamlThe document from above with pretty printing of the generated HTML document.

The document from above with pretty printing of the generated HTML document. We only on very rare occasions pretty print the resulting HTML document. The reason is that the HTML document is a derived, low level representation of the document which is only rarely consulted by humans. The parsing and pretty printing functions are part of a LAML tool for HTML parsing and pretty printing.