ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: HTML reduction
Date Wed, 17 Mar 2004 14:29:40 GMT
Graham,

Take a look at <ReplaceRegExp> in the optional tasks - esp. the last 
example:

><replaceregexp match="\s+" replace=" " flags="g" byline="true">
>    <fileset dir="${html.dir}" includes="**/*.html" />
></replaceregexp>
>    
>
> replaces all whitespaces (blanks, tabs, etc) by one blank remaining 
> the line separator. So with input
>
><html>    <body>
><<TAB>><h1>    T E S T   </h1>  <<TAB>>    
><<TAB>> </body></html>
>    
>
> would converted to
>
><html> <body>
> <h1> T E S T </h1> </body></html>
>  
>
/t

Graham Reeds wrote:

>I've just looked on the ant.apache.org list of external tasks for a html
>reduction tool.  Currently I am using 'bloated' html so I can view/debug the
>source easily.  I was wondering if there is a tool available that would run
>through html source and remove all comments and all unnessary whitespace.  I
>would write one myself but my Java skills aren't '1337 3nuff' being a C++
>man at heart.
>
>P.S.  I've just recieved my copy of 'Java Development with Ant' - hope it
>was worth it:-)
>
>--
>
>Graham Reeds,
>grahamr@ntlworld.com
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message