[plt-scheme] How to expand x-expr in template?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Wed Apr 21 16:55:51 EDT 2010

There must be an easy way to do this, but I can't seem to figure it out.

Suppose I have a template file that includes:

...
<form>
@(formlet-display my-formlet)
</form>
...

(formlet-display my-formlet) returns a forest of x-expressions. If I
were in Scheme and working with x-exprs directly, I could use ,@ (aka
unquote-splicing--thanks Jay for telling me about this a while ago)
and the whole thing would be rendered correctly. But when I
(include-template "file.html") I can't figure out how to get the HTML
expanded correctly.

Todd


Posted on the users mailing list.