[plt-scheme] Embedding scheme in web pages

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Fri Jan 19 13:12:31 EST 2007

>> 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?

Hi Maarten,

It's doable.  (I was thinking of possibly porting something like Terrence 
Parr's StringTemplate library to PLT Scheme, but the school semester just 
started, so I shouldn't have time at the moment... *grin*)

Still, you should be able to do something like this with straight 
servlets, in the style described in Section 3 of:


If you stick within the DrScheme environment, you'll get a lot of tool 
support, including lexical scope and variable renaming support, which is 
pretty nice.

You'll probably want a servlet involved in the loop anyway.  Servlets 
provide a context for doing things like getting request parameters: if 
you're generating some kind of dynamic content, you'll probably need that 
context to produce interesting values.

Best of wishes!

Posted on the users mailing list.