[plt-scheme] Beautify (auto-)generated HTML-Code of servlets

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Wed Jan 3 17:37:09 EST 2007


Hi Stefan,

Whoops, I didn't read your message clearly enough; my apologies!  You're 
wanting to pretty-print the response from the web server.  In that case, 
you'll probably need to be more explicit about the response.  From the 
documentation:

http://download.plt-scheme.org/doc/360/html/web-server/web-server-Z-H-12.html#node_sec_10.1.3

we have the option to return either an x-expr (which is what you're doing 
now), or a more explicit list of bytes.  So Rather than passing back an 
x-expr, where the server does the x-expr->bytes conversion, we can do the 
conversion ourselves, and then pass that back as the response.


There's an xml pretty printer in the xxexpr.plt PLaneT package that you 
can probably reuse:

     http://planet.plt-scheme.org/#xxexpr.plt

I don't know why its documentation isn't linked from PLaneT, but you can 
find it here:

     http://ja.soegaard.net/planet/html/lshift/xxexpr.plt/current/doc.txt


Best of wishes!


Posted on the users mailing list.