LML2 README
Author: Kevin Rosenberg
Description: Lisp Markup Language Documentation
Keywords: Common Lisp, HTML, Markup Langauge

# LML2 Documentation

## Overview

LML2 is a Common Lisp package for generating HTML and XHTML documents. LML2 is based on:

- LML by Kevin Rosenberg
- htmlgen by Franz, Inc.

The home page for LML2 is http://lml2.b9.com/.

## Prerequisites

- ASDF
- KMRCL

## Differences between LML2 and LML

The syntax and HTML generation for LML2 are based on Franz's htmlgen macro. Personally, I like the syntax of LML better than LML2, but there are advantages of Franz's approach:

- Faster compilation and runtime HTML generation
- Behavior of tags is extensible

## Differences between LML2 and htmlgen

- LML2 is XHTML compatible with close tags so that (html :hr) now produces '<hr />'
- Lowercase tag names so that (html ((:p class 'a))) now produces '<p class="a"></p>
- Addition of new tags such as :insert-file, :nbsp, :jscript
- Removal of the if* macro from the htmlgen.lisp source code
- Incorporation of LML's standard site macro and other helper functions.
- Addition of special attribute tags (:if :when :optional :format :format
- Automatic quoting of attribute values for non-string values
- Post macroexpansion code walker to collape sequential write-string calls

## Installation

The easiest way to install LML is to use the Debian GNU/Linux operating system. You can then use the command `apt-get install cl-lml2` to automatically download and install the LML2 package.

On a non-Debian system, you need to have ASDF installed to load the system definition file. You will need to change the source pathname in the system file to match the location where you have installed LML.

## Usage

Currently, there is no documentation on the functions provided by LML2. However, the source code is instructive and there are example files included in the LML2 package.

## Examples

Iteration
    (html
       (:i "The square of the first five integers are: ")
       (:b (loop as x from 1 to 5
               doing (html  (:princ (* x x))))))
| The square of the first five integers are: 1 4 9 16 25

View this page's LML2 source.