Generated: May 6, 2005, 18:55:25 Copyright © 2005 , Kurt Nørmark The local LAML software home page

LAML System Overview

This description is meant to be a general overview of the LAML software, with special emphasis on the installation process and its consequences on a particular LAML configuration.

The LAML installation process is driven by a Scheme program, which must be called by the the person who install LAML. Thus, the installation of LAML is not as easy as you may expect from state-of-the-art Windows installation procedures. On the other hand, our experience shows that most people are able to carry through the few steps in the LAML installation procedure without problems. The installation process writes a number of important files into your file system (all in the LAML directory, with the .emacs file as an exception). The file laml.scm is of particular importance, see below. It is located in the root directory of your LAML system. If you prepare to use Emacs for activation of LAML, the laml.el file is also important (also in the LAML root). The emacs-support/ directory contains other important Emacs lisp files. The installation process also produces a contribution to your .emacs file.

Each triple (scheme-system, platform, operating-system) has its own compatibility file in LAML, see the directory lib/compatibility. A compatibility file contains a few non-standard (non R4RS) Scheme functions used in LAML. In addition, it contains the functions which transfer context information to LAML, because the implementation of these are bound to be system dependent.

Now about laml.scm. This file must be loaded as the first thing in any LAML program, including CGI programs that use LAML. Details about your configuration is hard-wired in laml.scm. In addition it loads the appropriate compatibility file from lib/compatibility and the general library from lib.

After the loading of laml.scm, a style file will normally be loaded. There are styles for a number of purposes in the LAML distribution. And you can easily write your own style. A style should always load a HTML mirror, either one of the new accurate mirrors, such as XHTML1.0, or one of the other mirrors. You are recommended to use lib/xml-in-laml/mirrors/xhtml10-transitional-mirror.scm or one the sibling XHTML mirrors. You can use lib/html4.01-transitional-validating/html4.scm , but you should not use lib/html.scm and lib/html-v1.scm, which only are provided for backward compatibility.

As of 2003, the kernel of LAML allows you to generate mirrors of XML languages form XML DTDs. XHTML and SVG are supported via such mirrors, and as part of our work with LAML we have created a number of additional XML language. LAML has its own XML DTD parser and a mirror generation tool for creation of mirrors of XML languages in Scheme. Given an LAML (XML-in-LAML) document in some high-level XML language, it can be transformed to a lower-level XML language. The target XML language is often XHTML. LAML provides a simple transformation framework for this. The XML-in-LAML tutorial is a good place to start.

There are also a number of LAML tools for various purposes. These can use a style, but they do not need to. A tool is typically started by a tiny LAML file which serves as a script that calls some underlying functionality implemented in Scheme.

In order to use LAML you make a file, say f.laml. You arrange that laml.scm is loaded. It is done in various ways, depending on whether you work via Emacs, via command file (shell), or within a Scheme system. In all cases we attempt to transfer information about the startup-directory and the source file name to the LAML program. This is called context information. When the LAML program f.laml runs it usually writes a file f.html in the same directory as f.laml. (In some situations other effects can be experienced or provided for, however). The LAML Emacs interface supports this process in a very flexible way (via a single key stroke).

If you happen to use a non-supported Scheme system or a non-supported platform you will have to port LAML. There is a detailed cookbook for this. Here we will be concerned with the overall picture. The first thing is to implement the compatibility file. This is the file in the lib/compatibility directory; A compatibility file must be named in particular way, as explained in the porting cookbook. This part of the porting is usually not that hard. Next comes the support of various ways to activate LAML. The easiest solution is just to call a procedure called laml from you Scheme prompt. In the current version, this solution is quite good. You can also activate LAML from a command prompt (a shell). This requires that you write a template of such a shell command with a particular name. The installation process will bring it to the proper place (the bin directory) in the file system and make certain substitutions. The best and most ideal solution is to implement LAML activation from Emacs. This is ideal, but most useful for people who already are used to Emacs. In order to support this you must implement three Elisp activation functions, which brings the necessary LAML context from Emacs to LAML. This part of the porting process is probably the most difficult. However, a number of versions exists, so you can be inspirred by existing stuff.

 

Kurt Nørmark
normark@cs.aau.dk
http://www.cs.auc.dk/~normark/

Program Oriented Web Engineering - using LAML  

 

Generated: May 6, 2005, 18:55:25