ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <>
Subject How to prevent processing of <pre> with the whitespace compression task using ReplaceRegExp
Date Fri, 16 Feb 2007 22:00:21 GMT

I'm using white space compression as illustrated here :
, with Ant 1.6.5 , my original purpose
for using whitespace compression was to reduce the size of the WAR file so that it could be
uploaded faster to a production environment and also to reduce disk space occupied by a web
page, web page size and decrease the web page loading speed.

Everything works well with whitespace compression, except for certain cases were I want the
whitespaces *preserved*. 

For example, in a few JSP pages I have the HTML <pre> tag, which is supposed to display
it's content exactly as they appear but, after whitespace compression everything
appears on just one line - this is not a problem, except that everything inside the <pre>
tag also falls on one line. 

Is there a way to tell the ReplaceRegExp task to not process anything that appears between
the starting <pre> and the ending </pre> tag in any file?

I recently learned that white-space compression doesn't significantly change a page's speed
 as mentioned on this thread:

But, I'm still interested in knowing if it is possible to ignore processing certain sections
of a file with a condition.

Any pointers or information would be appreciated.


Yahoo! Music Unlimited
Access over 1 million songs.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message