velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lynch <>
Subject More Gobbling whitespace...
Date Wed, 04 Jul 2001 01:24:13 GMT
I originally posted this to turbine-user by mistake.
They provided good feedback, but I thought I should
repost to my original intended list for your comments.


To save response size of content delivered
over the web, I am looking for a way to return
templates written like this :



    This is tabbed text

        Here is the next line that starts with


To output to the browser like:

This is tabbed text
Here is the next line that starts with spaces.
----8<-------------------The output would be much
cleaner and less readable
using view source and smaller in size to download.
We had an inhouse template parser that had this
Is there a way that output generated by velocity can
1) leading whitespace, and tabs
2) trim all whitespace and tabs at the end of lines
3) maintain new line characters
4) remove empty lines

all without the various hacks I have seen like using
comment directives at the beginning of lines.
It would be nice to have this be turned on and off via
a property so that developers could always get the
formatted source to help debugging. I realize this may
useful for only
web based templates, but hey it would be very cool

Maybe velocity can do this already?


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

View raw message