It's funny that you mention this Philipp. I too noticed the html whitespaces a while ago. While your template code may be pristine, the rendered html is not to be very proud of.
Actually, I brought it up at a North American partner meeting 2 years ago as a casual comment, but nobody seemed to be very concerned about it ;)
I guess the beautifier could be plugged into the template engine.
Good luck,
Felipe
Felipe Jaramillo
eZ Certified Extension Developer http://www.aplyca.com | Bogotá, Colombia
eZ Publish 4.1 will provide a new feature allowing to apply a filter on the generated output [1] that would help you to filter and modify the HTML. Before this release, you can use some templates operators but it will be difficult to filter all the HTML.