From edi at agharta.de Wed Feb 1 01:21:39 2006 From: edi at agharta.de (Edi Weitz) Date: Wed, 01 Feb 2006 02:21:39 +0100 Subject: [cl-who-devel] Re: CL-WHO question In-Reply-To: <004201c62684$e8bf0850$0400a8c0@intra.aws.net> (Rob Blackwell's message of "Tue, 31 Jan 2006 16:39:30 -0000") References: <004201c62684$e8bf0850$0400a8c0@intra.aws.net> Message-ID: Hi! [Please use the mailing list for questions about CL-WHO.] On Tue, 31 Jan 2006 16:39:30 -0000, "Rob Blackwell" wrote: > I've been experimenting with CL-WHO, but I'm struggling to understand the > following behaviour and I wondered whether you would be kind enough to offer > advice? > > I want to take a string, say "rob", and turn it into a link like " href='rob.htm'>rob". > > I've tried various things like > > (let ((person "rob")) > (with-html-output-to-string (*standard-output*) > (htm (:a :href (fmt "~a.htm" person) (str person))))) > > But that returns > > "rob" (let ((person "rob")) (with-html-output-to-string (*standard-output*) (htm (:a :href (format nil "~a.htm" person) (str person))))) (let* ((person "rob") (link (format nil "~a.htm" person))) (with-html-output-to-string (*standard-output*) (htm (:a :href link (str person))))) Attribute values aren't treated like the body of a tag. See for details. Cheers, Edi.