The Styler Task for Ant

The styler task makes useful combinations of XSLT transformations easy to specify in an Ant build file. Like the built-in Ant task style, styler can apply a single transformation to a set of XML files. But it can also:

The manual page for styler is here. The author is Arnold deVos.


Available for download and use under the LGPL license.


  1. Place the styler.jar file in the Ant lib directory.

  2. Ensure that the jar files for Xalan 2 are in the Ant lib directory or otherwise on the classpath.

  3. If you will be processing HTML files, ensure that the JTidy jar file is also in the Ant lib directory or otherwise on the classpath. Version 04aug2000r6 has been tested with styler.

  4. If you will be using regular fragmentations to parse element content, ensure that the fragmentXML jar file is in the Ant lib directory or classpath. Version 0.11 has been tested with styler.

  5. Add the following taskdef is to any build.xml file that uses styler:

    <taskdef classname="" name="styler"/>
  6. You can now use the styler task as described in the manual page.


Fixed minor bugs in SOX whitespace handling. Added a basic SOX writer.
Fixed bug that left output files open and locked. Added new input type SOX: Simple Outline XML.
Changed the html type to use the HTML output method, correcting problems with character encoding and empty tag generation. Introduced the xhtml type that (imperfectly as yet) generates XHTML and the html4 type which is a synonym for html. HTMLWriter classes renamed for consistency. Set type="xhtml" on the output element for backwards compatibility.
Added text output and file types txt, sql and text.
Improved manual page.
Refactored to allow custom file and transform types to be used. Added regular fragmentations support.


The previous version of styler:

Copyright 2001, 2002 Langdale Consultants
Contact Arnold deVos for further information.