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.3 2002/10/09 14:24:47 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 GNU General Public License.
16 ;;;; *************************************************************************
19 (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))
22 ;;; HTML/XML constants
24 (defvar *std-xml-header*
26 "<?xml version=\"1.0\" ?>~%<?xml-stylesheet type=\"text/css\" href=\"/umlsclass.css\" ?>~%~%"))
28 (defun std-xml-header ()
33 (defvar *base-url* "")
34 (defun base-url! (url)
35 (setq *base-url* url))
37 (defun make-url (page-name &key (base-dir *base-url*) (vars nil))
38 (concatenate 'string base-dir page-name
40 (string-trim-last-character
41 (concatenate 'string "?"
44 (when (and (car var) (cadr var))
46 (car var) "=" (cadr var) "&")))