[plt-scheme] Request for pretty-printing in webserver

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Mar 29 18:49:07 EST 2003

I'm not sure, but I suspect it does that for efficiency reasons. 

One thing you can do when you're debugging is to use Emacs to turn the
file into something slightly more readable by replacing > with >^J. You
can do this with these keystrokes:

  M-x replace-string

Or, you can write a little script that reads in the xml and displays it
back out again when you read it.

Or, were you wanting to do this for other than debugging reasons?


At Sat, 29 Mar 2003 18:27:49 -0500 (EST), dvanhorn at emba.uvm.edu wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> I'd like for the web server to emit pretty printed XML in the case of calling
> send/suspend with an X-expression.  Currently the web server prints a single
> line of XML, which can be difficult to read.
> An easy solution is to change the (xexpr->string page) expression (line 773,
> web-server-unit.ss) to:
> (let ((tmp-out (open-output-string)))
>   (display-xml/content (xexpr->xml page) tmp-out)
>   (get-output-string tmp-out))
> Although this is inefficient, but necessary so that Content-length can be
> included in the headers.
> Is there, perhaps, a better way of doing this?  Is there a reason for not doing
> this, ie for using the xexpr->string approach?
> Thanks.
> -d

Posted on the users mailing list.