Processes a set of XML documents using a stylesheet written in DVSL
(Declarative Velocity Style Language).
This is useful for building views of XML based documentation,
or for generating code, etc. Conceptually, this task performs the same
function as the <style> task included with the Ant distribution
but using a stylesheet with DVSL syntax instead of XSLT.
As DVSL has a tight binding with Java objects, access is provided to
the "Toolbox" which loads properties and objects which are then exposed to
the stylesheet in a transparent manner.
Since DVSL utilizes Velocity for rendering its output, access is
provided to allow configuring the Velocity runtime environment from within
this task.
It is possible to refine the set of files that are being processed. This
can be done with the includes, includesfile, excludes,
excludesfile and defaultexcludes attributes. With the includes
or includesfile attribute you specify the files you want to have included
by using patterns. The exclude or excludesfile attribute is used
to specify the files you want to have excluded. This is also done with patterns.
And finally with the defaultexcludes attribute, you can specify whether you
want to use default exclusions or not. See the section on directory based tasks, on how the
inclusion/exclusion of files works, and how to write patterns.
This task forms an implicit FileSet and supports all
attributes of <fileset>
(dir
becomes basedir
)
as well as the nested <include>
, <exclude>
and <patternset>
elements.
DVSL supports the use of a <tool> element which is used to pass values
to the DVSL toolbox configuration.
All Velocity messages are routed through Ant's logging system but
will only be output if their level exceeds that of Ant's current logging
level. By default, this means Velocity informational messages are
suppressed while warning and error messages are output. The following
table shows the mapping between Ant logging options and the corresponding
levels of Velocity messages which are output.
Ant Logging Option
|
Velocity Messages Output
|
-quiet
|
errors
|
no option
|
errors, warnings
|
-verbose
|
errors, warnings, informational
|
-debug
|
errors, warnings, informational, debug
|
If the logfile
attribute is specified to this task,
all Velocity messages are written to the specified log file without
regard to any logging option specified to Ant.