; The LAML library and programs written by Kurt Normark, Aalborg University, Denmark.
; Copyright (C) 1999  Kurt Normark.
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  US
;;;; The HTML version 1 library is an attempt to create a more systematic bottom layer of LAML than
;;;; found in the HTML library.
;;;; The version number has nothing to do with the version of the HTML language.
;;;; Given a list of single tags and a list of double tags we are able generate Scheme mirror functions.
;;;; These functions are provided via this library. In addition a number of helping functions
;;;; are contained in this library. Also a few page creation functions, built on top of the
;;;; automatically generated functions, are provided.<p>
;;;;
;;;; The mirroring tool functions are not part of this library. They can be found in the tool 'The HTML mirroring tool'.<p>
;;;;
;;;; If you are about to use this library you should really use html4.0-loose/basis.scm
; ----------------------------------------------------------------------------
;;; Tag generation. 
;;; Higher order functions which generate an html Scheme functions.
;; Given a tag-name generate an mirror function for the tag in Scheme. For double tags. The parameter tag-name is a symbol.
In html-v1: Link from generate-tag-function to it's cross reference table entry 
(define (generate-tag-function tag-name) (lambda (contents . attributes) (itag tag-name contents attributes))) ;; Given a tag-name generate an mirror function for the tag in Scheme. For single tags. The parameter tag-name is a symbol. In html-v1: Link from generate-tag1-function to it's cross reference table entry 
(define (generate-tag1-function tag-name) (lambda attributes (itag1 tag-name attributes))) ; ------------------------------------------------------------------------------------------------------------------------------- ;;; General tag functions. ;;; A number of low level tag support functions. ;;; These functions are useful if we need to generate separate start and/or end tags. In html-v1: Link from start-tag to it's cross reference table entry 2.1. Getting started: the top level functions
(define (start-tag kind . attributes) ;; Return a HTML start tag. ;; kind is a string. ;; attributes is a lisp property list of key-symbol value pairs (if (null? attributes) (string-append "<" kind ">") (let ((html-attributes (linearize-attributes attributes))) (string-append "<" kind " " html-attributes " >")))) In html-v1: Link from end-tag to it's cross reference table entry 2.1. Getting started: the top level functions
(define (end-tag kind) ;; Retun a html end tag (string-append "</" kind ">")) In html-v1: Link from tag to it's cross reference table entry 
(define (tag name contents . attributes) ;; Return a balanced html tag of both start and end tag: ;; <name attributes> contents </name> ;; name is a symbol or string. ;; contents is the stuff between the start and end tag: converted to string ;; attributes is a lisp property list of key-symbol value pairs (if (null? attributes) (string-append "<" (as-string name) ">" (as-string contents) "</" name ">") (let ((html-attributes (linearize-attributes attributes))) (string-append "<" (as-string name) " " html-attributes ">" (as-string contents) "</" name ">")))) In html-v1: Link from itag to it's cross reference table entry 
(define (itag name contents attributes) ;; Return a balanced html tag of both start and end tag, based on two parameters. ;; The 'i' in the function name means 'internal'. (if (null? attributes) (string-append "<" (as-string name) ">" (as-string contents) "</" name ">") (let ((html-attributes (linearize-attributes attributes))) (string-append "<" (as-string name) " " html-attributes ">" (as-string contents) "</" name ">")))) In html-v1: Link from tag1 to it's cross reference table entry 
(define (tag1 name . attributes) ;; Return a single html tag without end tag ;; <name attributes> (if (null? attributes) (string-append "<" (as-string name) ">") (let ((html-attributes (linearize-attributes attributes))) (string-append "<" (as-string name) " " html-attributes ">")))) In html-v1: Link from itag1 to it's cross reference table entry 
(define (itag1 name attributes) ;; Like tag1, but with a fixed number of paramers. ;; The 'i' in the function name means 'internal'. (if (null? attributes) (string-append "<" (as-string name) ">") (let ((html-attributes (linearize-attributes attributes))) (string-append "<" (as-string name) " " html-attributes ">")))) ; -------------------------------------------------------------------------------------------------------------------------------- ;;; Attribute linearization. In html-v1: Link from linearize-attributes to it's cross reference table entry 
(define (linearize-attributes attr-list) ;; convert the Lisp property list attr-list to a string conforming ;; to the rules of an html attribute list (string-append (linearize-attributes-1 (reverse attr-list) "" (length attr-list)))) In html-v1: Link from linearize-attributes-1 to it's cross reference table entry 
(define (linearize-attributes-1 attr-list res-string lgt) (cond ((null? attr-list) res-string) ((>= lgt 2) (linearize-attributes-1 (cddr attr-list) (string-append (linearize-attribute-pair (car attr-list) (cadr attr-list)) " " res-string) (- lgt 2))) ((< lgt 2) (error "Linearize-attributes-1: Called with an odd length attribute list. Not a Lisp property list")))) In html-v1: Link from linearize-attribute-pair to it's cross reference table entry 
(define (linearize-attribute-pair val attr) (string-append (as-string attr) " = " (string-it (as-string val)))) ; ---------------------------------------------------------------------------- ;;; Auto generated functions. ;;; Use the LAML tool html-tag-generation.scm in the tools directory to generate these functions. ; Generated by html-tag-generation.scm. Do not edit ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:a to it's cross reference table entry 
(define html:a (generate-tag-function "a")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:address to it's cross reference table entry 
(define html:address (generate-tag-function "address")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:applet to it's cross reference table entry 
(define html:applet (generate-tag-function "applet")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:b to it's cross reference table entry 
(define html:b (generate-tag-function "b")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:big to it's cross reference table entry 
(define html:big (generate-tag-function "big")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:blockquote to it's cross reference table entry 
(define html:blockquote (generate-tag-function "blockquote")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:body to it's cross reference table entry 
(define html:body (generate-tag-function "body")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:caption to it's cross reference table entry 
(define html:caption (generate-tag-function "caption")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:center to it's cross reference table entry 
(define html:center (generate-tag-function "center")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:cite to it's cross reference table entry 
(define html:cite (generate-tag-function "cite")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:code to it's cross reference table entry 
(define html:code (generate-tag-function "code")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:comment to it's cross reference table entry 
(define html:comment (generate-tag-function "comment")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:dd to it's cross reference table entry 
(define html:dd (generate-tag-function "dd")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:dfn to it's cross reference table entry 
(define html:dfn (generate-tag-function "dfn")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:dir to it's cross reference table entry 
(define html:dir (generate-tag-function "dir")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:div to it's cross reference table entry 
(define html:div (generate-tag-function "div")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:dl to it's cross reference table entry 
(define html:dl (generate-tag-function "dl")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:dt to it's cross reference table entry 
(define html:dt (generate-tag-function "dt")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:em to it's cross reference table entry 
(define html:em (generate-tag-function "em")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:embed to it's cross reference table entry 
(define html:embed (generate-tag-function "embed")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:font to it's cross reference table entry 
(define html:font (generate-tag-function "font")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:form to it's cross reference table entry 
(define html:form (generate-tag-function "form")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:frame to it's cross reference table entry 
(define html:frame (generate-tag-function "frame")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:frameset to it's cross reference table entry 
(define html:frameset (generate-tag-function "frameset")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h1 to it's cross reference table entry 
(define html:h1 (generate-tag-function "h1")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h2 to it's cross reference table entry 
(define html:h2 (generate-tag-function "h2")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h3 to it's cross reference table entry 
(define html:h3 (generate-tag-function "h3")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h4 to it's cross reference table entry 
(define html:h4 (generate-tag-function "h4")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h5 to it's cross reference table entry 
(define html:h5 (generate-tag-function "h5")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:h6 to it's cross reference table entry 
(define html:h6 (generate-tag-function "h6")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:head to it's cross reference table entry 
(define html:head (generate-tag-function "head")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:html to it's cross reference table entry 
(define html:html (generate-tag-function "html")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:i to it's cross reference table entry 
(define html:i (generate-tag-function "i")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:iframe to it's cross reference table entry 
(define html:iframe (generate-tag-function "iframe")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:kbd to it's cross reference table entry 
(define html:kbd (generate-tag-function "kbd")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:li to it's cross reference table entry 
(define html:li (generate-tag-function "li")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:map to it's cross reference table entry 
(define html:map (generate-tag-function "map")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:marquee to it's cross reference table entry 
(define html:marquee (generate-tag-function "marquee")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:menu to it's cross reference table entry 
(define html:menu (generate-tag-function "menu")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:multicol to it's cross reference table entry 
(define html:multicol (generate-tag-function "multicol")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:nobr to it's cross reference table entry 
(define html:nobr (generate-tag-function "nobr")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:noframes to it's cross reference table entry 
(define html:noframes (generate-tag-function "noframes")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:noscript to it's cross reference table entry 
(define html:noscript (generate-tag-function "noscript")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:object to it's cross reference table entry 
(define html:object (generate-tag-function "object")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:ol to it's cross reference table entry 
(define html:ol (generate-tag-function "ol")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:option to it's cross reference table entry 
(define html:option (generate-tag-function "option")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:p to it's cross reference table entry 
(define html:p (generate-tag-function "p")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:param to it's cross reference table entry 
(define html:param (generate-tag-function "param")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:samp to it's cross reference table entry 
(define html:samp (generate-tag-function "samp")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:script to it's cross reference table entry 
(define html:script (generate-tag-function "script")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:select to it's cross reference table entry 
(define html:select (generate-tag-function "select")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:small to it's cross reference table entry 
(define html:small (generate-tag-function "small")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:span to it's cross reference table entry 
(define html:span (generate-tag-function "span")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:strike to it's cross reference table entry 
(define html:strike (generate-tag-function "strike")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:strong to it's cross reference table entry 
(define html:strong (generate-tag-function "strong")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:style to it's cross reference table entry 
(define html:style (generate-tag-function "style")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:sub to it's cross reference table entry 
(define html:sub (generate-tag-function "sub")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:sup to it's cross reference table entry 
(define html:sup (generate-tag-function "sup")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:table to it's cross reference table entry 
(define html:table (generate-tag-function "table")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:td to it's cross reference table entry 
(define html:td (generate-tag-function "td")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:textarea to it's cross reference table entry 
(define html:textarea (generate-tag-function "textarea")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:title to it's cross reference table entry 
(define html:title (generate-tag-function "title")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:tr to it's cross reference table entry 
(define html:tr (generate-tag-function "tr")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:tt to it's cross reference table entry 
(define html:tt (generate-tag-function "tt")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:ul to it's cross reference table entry 
(define html:ul (generate-tag-function "ul")) ;; A Scheme mirrored HTML double tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag contents-form 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:var to it's cross reference table entry 
(define html:var (generate-tag-function "var")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:area to it's cross reference table entry 
(define html:area (generate-tag1-function "area")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:base to it's cross reference table entry 
(define html:base (generate-tag1-function "base")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:basefont to it's cross reference table entry 
(define html:basefont (generate-tag1-function "basefont")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:bgsound to it's cross reference table entry 
(define html:bgsound (generate-tag1-function "bgsound")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:br to it's cross reference table entry 
(define html:br (generate-tag1-function "br")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:col to it's cross reference table entry 
(define html:col (generate-tag1-function "col")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:colgroup to it's cross reference table entry 
(define html:colgroup (generate-tag1-function "colgroup")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:hr to it's cross reference table entry 
(define html:hr (generate-tag1-function "hr")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:img to it's cross reference table entry 
(define html:img (generate-tag1-function "img")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:input to it's cross reference table entry 
(define html:input (generate-tag1-function "input")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:isindex to it's cross reference table entry 
(define html:isindex (generate-tag1-function "isindex")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:link to it's cross reference table entry 
(define html:link (generate-tag1-function "link")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:meta to it's cross reference table entry 
(define html:meta (generate-tag1-function "meta")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:nextid to it's cross reference table entry 
(define html:nextid (generate-tag1-function "nextid")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:plaintext to it's cross reference table entry 
(define html:plaintext (generate-tag1-function "plaintext")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:pre to it's cross reference table entry 
(define html:pre (generate-tag1-function "pre")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:s to it's cross reference table entry 
(define html:s (generate-tag1-function "s")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:spacer to it's cross reference table entry 
(define html:spacer (generate-tag1-function "spacer")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:tbody to it's cross reference table entry 
(define html:tbody (generate-tag1-function "tbody")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:tfoot to it's cross reference table entry 
(define html:tfoot (generate-tag1-function "tfoot")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:thead to it's cross reference table entry 
(define html:thead (generate-tag1-function "thead")) ;; A Scheme mirrored HTML single tag function. Auto generated by means of the functions in html-tag-generation.scm. <p> ;; Usage: <pre>(html:tag 'attr1 val1 'attr2 val2) </pre> In html-v1: Link from html:wbr to it's cross reference table entry 
(define html:wbr (generate-tag1-function "wbr")) ; ----------------------------------------------------------------------------- ;;; Higher level html-v1 functions. ;;; Convenient HTML functions at a higher and more aggregate level, using html-v1 functions. ;;; Notice that some of these function assumes that other functions are defined. In html-v1: Link from html:page to it's cross reference table entry 
(define (html:page title meta-contributions body bg-color text-color link-color vlink-color) ;; Return an HTML page with html, head, meta and title tags. ;; Depends on the functions laml-standard-comment from the html library. ;; Furthermore, this function assumes that the functions tracing-comment and meta-tag-clauses are defined. ;; The function meta-tag-clauses must return a property list of meta-descriptors. ;; Tracing comment must return a string. Tracing-comment is meant to let us trace the LAML source files etc. ;; Meta-tag-clauses goes into a HTML meta-tag in the beginning of the generated document together with the parameter meta-contributions. ;; The html:page function is a more elaborate version of the page from from the html library. ;; The first part of the string output is the standard DOCTYPE. ;; The parameter meta-contributions is a list of meta-descriptors. ;; A meta-descriptor is a even length list of the form (key val key val ...). ;; The keys must be symbols, the values must be strings. ;; The last four parameters must consist of a background color, text color, link color and visited link color (all color RGB lists). ;; This function requires the plain html library to be loaded. (let ((meta-tags (append (meta-tag-clauses) meta-contributions))) (string-append (copyright-clause) (newline-string) (doctype-clause) (newline-string) (html:html (con (html:head (con (if (not (null? meta-tags)) (make-meta-contribution meta-tags) "") (html:title title) ) ) (html:body body 'bgcolor (apply rgb-string bg-color) 'text (apply rgb-string text-color) 'link (apply rgb-string link-color) 'vlink (apply rgb-string vlink-color) ) ) ) (newline-string) (laml-standard-comment) (newline-string) (tracing-comment) (newline-string) ))) In html-v1: Link from doctype-clause to it's cross reference table entry 
(define (doctype-clause) "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">") In html-v1: Link from make-meta-contribution to it's cross reference table entry 
(define (make-meta-contribution list-of-meta-descriptors) (apply string-append (map make-a-meta-contribution list-of-meta-descriptors))) In html-v1: Link from make-a-meta-contribution to it's cross reference table entry 
(define (make-a-meta-contribution meta-descriptor) (apply html:meta meta-descriptor)) In html-v1: Link from html:page-with-keypress-script to it's cross reference table entry 
(define (html:page-with-keypress-script title meta-contributions body script-loading script keypress-action bg-color text-color link-color vlink-color) ;; A version of html:page with Javascript scripts as a new fourth to sixth parameter. ;; The parameter script-loading can either be static or dynamic (symbols). If static, included the script in the html document. ;; If dynamic, refer to the script in the a javascript subdirectory. ;; The parameter script is a list of two file path components (prefix-static-part js-filename), both strings. ;; If script-loading is static (string-append prefix-static-part js-filename) is the name of the script file, the contents of ;; which must be included inline. ;; If script-loading is dynamic js-filename is the name of a file in the html/javascript directory, including extension. ;; The parameter keypress-action is supposed to be an activation of a Javascript function defined in script. ;; Uses the function read-text-file from the file-read library. (let ((meta-tags (append (meta-tag-clauses) meta-contributions)) (script-clause (cond ((eq? script-loading 'static) (html:script (read-text-file (string-append (car script) (cadr script))))) ((eq? script-loading 'dynamic) (html:script "" 'src (string-append "javascript/" (cadr script)))) (else (error "html:page-with-keypress-script in html-v1: problems determining type of script loading")))) ) (string-append (doctype-clause) (newline-string) (html:html (con (html:head (con (if (not (null? meta-tags)) (make-meta-contribution meta-tags) "") (html:title title) ) ) script-clause (html:body body 'bgcolor (apply rgb-string bg-color) 'text (apply rgb-string text-color) 'link (apply rgb-string link-color) 'vlink (apply rgb-string vlink-color) ) ) 'onkeypress keypress-action ) (laml-standard-comment) (newline-string) (tracing-comment) (newline-string) ))) ; Return a pre-page, without body and trailing html stuff. ; Used for imperative output of an HTML page. ; Usage: First call this function, the output the body, and then call html:post-page. In html-v1: Link from html:pre-page-with-keypress-script to it's cross reference table entry 
(define (html:pre-page-with-keypress-script title meta-contributions script-loading script keypress-action bg-color text-color link-color vlink-color) (let ((meta-tags (append (meta-tag-clauses) meta-contributions)) (script-clause (cond ((eq? script-loading 'static) (html:script (read-text-file (string-append (car script) (cadr script))))) ((eq? script-loading 'dynamic) (html:script "" 'src (string-append "javascript/" (cadr script)))) (else (error "html:page-with-keypress-script in html-v1: problems determining type of script loading")))) ) (string-append (doctype-clause) (newline-string) (start-tag "html" 'onkeypress keypress-action) (html:head (con (if (not (null? meta-tags)) (make-meta-contribution meta-tags) "") (html:title title) ) ) script-clause (start-tag "body" 'bgcolor (apply rgb-string bg-color) 'text (apply rgb-string text-color) 'link (apply rgb-string link-color) 'vlink (apply rgb-string vlink-color))))) In html-v1: Link from html:post-page to it's cross reference table entry 
(define (html:post-page) (con (end-tag "body") (end-tag "html") (newline-string) (laml-standard-comment) (newline-string) (tracing-comment) (newline-string)))