Yes, this helps. i think it also answers my second post -> one should use "with-html-output-to-string"... Right?
Matus
On Thu, Jul 28, 2011 at 10:06 AM, Sebastian Tennant sebyte@smolny.plus.com wrote:
Quoth Matus Kmit simply.nitaai@gmail.com:
How does one properly embed and evaluate lisp code inside the tag body?
You can 'embed' the *value* of an attribute, but not attributes themselves.
In practice this is not a serious limitation.
(:p (fn)) does not work.
No, but this does:
(flet ((fn () "value")) (with-html-output-to-string (s) (:p :attribute (fn)))) => "<p attribute='value'></p>"
Note, that to do something similar in the text node of an element, you should use one of the exported symbols; esc, fmt or str.
For example:
(flet ((fn () "Attributes and their values")) (with-html-output-to-string (s) (:h1 (str (fn))))) => "<h1>Attributes and their values</h1>"
Hope this helps,
Sebastian
Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
cl-who-devel site list cl-who-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-who-devel