W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

Ant support for jTidy?

From: Bill Burton <billb@progress.com>
Date: Mon, 25 Nov 2002 22:37:53 -0500
To: html-tidy <html-tidy@w3.org>
Message-id: <3DE2EC91.1010600@progress.com>


Does anyone know if there's an Ant Task for jTidy?

Being able to run jTidy from Ant would be an excellent way of invoking 
jTidy because the way files can be specified is rather flexible.

One way to implement support for Ant would be to write a <tidy> task 
roughly based on Ant's <style> task 
(http://jakarta.apache.org/ant/manual/CoreTasks/style.html) which 
performs XSLT transformation.  Appropriate nested elements and 
attributes would be added to support the comparable command line options 
  for jTidy.  For instance:

   <tidy destdir="${dest_dir}" srcdir="${src_dir}"
       outputxhtml="true" wrap="78">
     <include name="**/*.html"/>
     <include name="**/*.jsp"/>

Another way of integrating jTidy with Ant would be to write a 
(http://jakarta.apache.org/ant/manual/CoreTypes/filterchain.html) thus 
allowing jTidy to be called from <copy> 
(http://jakarta.apache.org/ant/manual/CoreTasks/copy.html) or other 
tasks something like this:

   <copy todir="${dest_dir}">
     <fileset dir="${src_dir}" includes="**/*.html,**/*.jsp"/>
       <tidyfilter outputxhtml="true" wrap="78"/>

Note that the Ant committers are trying to push back into including new 
tasks for third party applications so it would make more sense if such 
functionality was included with jTidy itself.

I don't have any immediate need for either of the above but if someone 
is interested in Ant support for jTidy, I might be able to help out as 
I've had some experience writing tasks for Ant.

Received on Monday, 25 November 2002 22:37:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:52 UTC