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