SourceForge Logo NVelocity


About

Community

Docs

Related Sites

dvsl

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.

Parameters

Attribute Description Required
destdir Directory in which to store the results. true
extension This is the extension that is appended to the end of your .xml file. For example, with an extension of ".html", index.xml would be converted into index.html. By default, the extension is .html. false
style This is the path to the .vsl template true
force Recreate target files, even if they are newer than their corresponding source files or the stylesheet. false
outputencoding encoding to be used for output files. If not specified, the default is UTF-8 false
logfile log file for Velocity messages. The default is to log through Ant's logging system but limit output based on Ant's logging level. Specifying this attribute causes all Velocity messages to be sent to the specified file instead. false
toolboxfile specifies the toolbox properties file name. false
validatingparser specifies that the parser for the input XML should validate. Boolean valued, default is false. false

Context Objects

Name Description
$context.GetAppValue($String) Used to expose application specific values, including "infilename" and "outfilename" which represent file names without path for the input and output files.

Examples

This is the task definition to create the NVelocity site documentation

<dvsl style="xdocs/example1.dvsl"
      destdir="output"
      extention=".html"
      force="false"
      logfile="dvsl.log">
	<fileset basedir="xdocs">
                <includes name="*.xml"/>
	</fileset>
</dvsl>