- From: Bill Burton <billb@progress.com>
- Date: Mon, 25 Nov 2002 22:37:53 -0500
- To: html-tidy <html-tidy@w3.org>
Hello, 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"/> </tidy> Another way of integrating jTidy with Ant would be to write a filterreader (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"/> <filterset> <tidyfilter outputxhtml="true" wrap="78"/> </filterset> </copy> 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. -Bill
Received on Monday, 25 November 2002 22:37:56 UTC