[plt-scheme] xexprs and sxml

From: Anton van Straaten (anton at appsolutions.com)
Date: Mon Jan 9 21:32:03 EST 2006

Jay McCarthy wrote:
> I personally don't see a whole lot of value in the web-server knowing
> anything about XML/HTML at all, except making it regular to use some
> decent libraries for abstracting things. Other than
> send/suspend/callback, nothing actually requires XML for doing
> anything.

I agree.

One minor abstraction that I think would be useful are standard 
functions like make-sxml-response and make-xexpr-response, which can be 
very simple functions, but make it a little easier and more standard to 
generate the desired response type.

A simple version of make-sxml-response (without any advanced response 
options) is:

   (define (make-sxml-response sxml)
     (cons "text/html" (sxml->html sxml)))

...but last time I checked, there wasn't anything like sxml->html in the 
standard PLT collections.


Posted on the users mailing list.