[Bese-devel] How to use tal-templates

William Halliburton whalliburton at gmail.com
Sun Aug 14 14:39:49 UTC 2005


Ok. Here is an answer the second part. 

(defun escape-char (char str)
  "Return string with CHAR escaped in string STR with #\\"
  (with-output-to-string (s)
      (loop
       for c across str
       do (cond
          ((char= c char)
	   (write-char #\\ s)
	   (write-char c s))
	  (t (write-char c s))))))

On 8/14/05, Marco Simon <marco_simon at web.de> wrote:
> Hello list,
> 
> could somebody please give me short "hello world" on how to
> use the tal-template engine ?
> I thought it would be as easy as declaring an component with
> the super-class "template-component"  and a template-name, but
> that seemed not to be enough.
> I even had a look at Marco Baringers's "counter" example which uses the
> tal-template mechanism - but didn't manage it.
> So could you please give me some example-lines which show how
> to implement *.tal - files ?
> 
> Beside that (but this hasnt to do with ucw) I'm looking for a lisp-function
> which escapes all " within a string to \" but didn't find any predifined
> cl-function
> so far. Any hints ?
> 
> Thanks a lot
>  best regards
>   Marco
> 
> 
> _______________________________________________
> bese-devel mailing list
> bese-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel
>



More information about the bese-devel mailing list