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

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Mar 31 07:48:43 EST 2003

On Mar 31, Shriram Krishnamurthi wrote:
> 1. Yes.  You get a *significant* blow-up for many documents.  The
>    Web server didn't want to assume you would only generate small
>    documents.
> 
> 2. The semantics of spaces in XML are rather tricky, and the server
>    didn't want to introduce errors (since pretty-printing
>    fundamentally is about introducing spaces).

In my HTML generator thing (so also in my server), I had an explicit
goal of generating good looking HTML code so people can use it to
generate files that would later be edited manually, and this was
indeed the case for one set of pages.  As for spaces, it took some non
trivial work to get it fast enough, as well as some additional
information bits on tags that provide the output with that extra
information -- places where you space matters (eg <pre>), and places
where you want your output to look in a certain way (spaces or
newlines).  Also, it knows not to put spaces or newlines in the wrong
place -- right after an openning tag.

I think that the readable results are definitely worth it, especially
for "debugging" HTML.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.