1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: web-utils.lisp
6 ;;;; Purpose: Basic web utility functions
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2000
10 ;;;; $Id: web-utils.lisp,v 1.4 2002/10/10 16:23:48 kevin Exp $
12 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
14 ;;;; KMRCL users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
20 (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))
23 ;;; HTML/XML constants
25 (defvar *std-xml-header*
27 "<?xml version=\"1.0\" ?>~%<?xml-stylesheet type=\"text/css\" href=\"/umlsclass.css\" ?>~%~%"))
29 (defun std-xml-header ()
34 (defvar *base-url* "")
35 (defun base-url! (url)
36 (setq *base-url* url))
38 (defun make-url (page-name &key (base-dir *base-url*) (vars nil))
39 (concatenate 'string base-dir page-name
41 (string-trim-last-character
42 (concatenate 'string "?"
45 (when (and (car var) (cadr var))
47 (car var) "=" (cadr var) "&")))