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

From: dvanhorn at emba.uvm.edu (dvanhorn at emba.uvm.edu)
Date: Sat Mar 29 19:33:14 EST 2003

Quoting Robby Findler <robby at cs.uchicago.edu>:

> 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
>   >
>   >^Q^J
> 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?
> Robby

Thanks.  Yes, this is primarily for debugging, although I had end-users in mind
who might check under the hood of a web page if they encountered a problem. 
Some browsers, eg Mozilla, do not handle very long single lines very well.  In
Mozilla, the line does not appear unless selected (highlighted).

So I added a parameter for an xexpr to string procedure in my sources of the web
server.  I also added a parameter for a document "prelude" string which is
useful for adding, for example, <?xml ...><!DOCTYPE ...> elements to the output,
which can't be done with X-exprs.


Posted on the users mailing list.