[plt-scheme] Embedding scheme in web pages
Maarten Koopmans skrev:
> Hi,
>
> I am looking into DrScheme and its web server and I noticed that the
> content is servlet based or static. Is there a way to embed scheme code
> in XML documents?
>
> I suspect it should be possible (XML boxes?) but being new to DrScheme
> some help would be highly appreciated!
>
> E.g. I'd like to write something like this:
>
> <html><head></head><body> (+ 1 2) </body></html>
>
> which should be served as:
>
> <html><head></head><body> 3 </body></html>
Search for "xexpr" in the HelpDesk.
Returning
`(html (head (title "A title"))
(body ,(+ 1 2)))
as the result of a servlet will generate the
wanted output.
--
Jens Axel Søgaard