org.apache.dvsl
Class DVSLTask

java.lang.Object
  extended by MatchingTask
      extended by org.apache.dvsl.DVSLTask
Direct Known Subclasses:
DVSLTask

public class DVSLTask
extends MatchingTask

A Task to process via DVSL a set of XML documents. This is useful for building views of XML based documentation. arguments:

Of these arguments, the sourcedir and destdir are required, or, in and out are required.

Following are the supported nested elements:

This task will recursively scan the sourcedir and destdir looking for XML documents to process via DVSL.

This task was adapted from Ant's <style> task (XSLTProcess class) from the 1.4.1 release.

Author:
Keith Visco, Sam Ruby, Russell Gold, Stefan Bodewig, Geir Magnusson Jr., Bill Burton.

Nested Class Summary
 class DVSLTask.Tool
           
 class DVSLTask.VelocityConfig
           
 
Field Summary
static String INFILENAME
          Supported app values
static String OUTFILENAME
           
 
Constructor Summary
DVSLTask()
          Creates a new DVSLTask Task.
 
Method Summary
 Path createClasspath()
          Set the classpath to load the Processor through (nested element).
 DVSLTask.Tool createTool()
          support for <tool> nested element
 DVSLTask.VelocityConfig createVelConfig()
          support for <velconfig> nested element
 void execute()
          Executes the task.
 void putAppValue(String name, Object o)
          Sets an application value from outside of the DVSL task
 void setBasedir(File dir)
          Set the base directory.
 void setClasspath(Path classpath)
          Set the classpath to load the Processor through (attribute).
 void setClasspathRef(Reference r)
          Set the classpath to load the Processor through via reference (attribute).
 void setDestdir(File dir)
          Set the destination directory where the generated files should be directed.
 void setExtension(String name)
          Set the desired file extension to be used for the target files.
 void setForce(boolean force)
          Set whether to check dependencies, or always generate.
 void setIn(File inFile)
          Sets an input xml file to be styled
 void setLogFile(File logFile)
          Sets the file to use for logging.
 void setOut(File outFile)
          Sets an output file
 void setOutputEncoding(String encoding)
          Sets the character encoding for output files.
 void setStyle(File dvslFile)
          Sets the file to use for stylesheet.
 void setStyleEncoding(String dvslFileEncoding)
          Sets the encoding of stylesheet file.
 void setToolbox(String toolboxFile)
          Deprecated. use setToolboxFile instead
 void setToolboxFile(File toolboxFile)
          Sets the Toolbox properties file to use.
 void setValidatingParser(boolean validating)
          Sets the flag to have DVSL use a validating parser for the input documents
 void setVelocityConfigClass(String classname)
          Allows the user to specify a class that implements Properties that will have user properties to be used when setting up DVSL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFILENAME

public static final String INFILENAME
Supported app values

See Also:
Constant Field Values

OUTFILENAME

public static final String OUTFILENAME
See Also:
Constant Field Values
Constructor Detail

DVSLTask

public DVSLTask()
Creates a new DVSLTask Task.

Method Detail

execute

public void execute()
             throws BuildException
Executes the task.

Throws:
BuildException

setForce

public void setForce(boolean force)
Set whether to check dependencies, or always generate.

Parameters:
force - false to check dependencies, true to always generate

setBasedir

public void setBasedir(File dir)
Set the base directory.

Parameters:
dir - name of the base directory

setDestdir

public void setDestdir(File dir)
Set the destination directory where the generated files should be directed.

Parameters:
dir - name of the destination directory

setExtension

public void setExtension(String name)
Set the desired file extension to be used for the target files. If not specified, ".html" is used.

Parameters:
name - the extension to use

setStyle

public void setStyle(File dvslFile)
Sets the file to use for stylesheet.

Parameters:
dvslFile - stylesheet filename

setStyleEncoding

public void setStyleEncoding(String dvslFileEncoding)
Sets the encoding of stylesheet file.

Parameters:
dvslFileEncoding - encoding of stylesheet file

setLogFile

public void setLogFile(File logFile)
Sets the file to use for logging. If not specified, all logging is directed through Ant's logging system.

Parameters:
logFile - logging filename

setToolbox

public void setToolbox(String toolboxFile)
Deprecated. use setToolboxFile instead

Sets the Toolbox properties file to use.

Parameters:
toolboxFile - properties file of tools

setToolboxFile

public void setToolboxFile(File toolboxFile)
Sets the Toolbox properties file to use.

Parameters:
toolboxFile - properties file of tools

setVelocityConfigClass

public void setVelocityConfigClass(String classname)
Allows the user to specify a class that implements Properties that will have user properties to be used when setting up DVSL.

Parameters:
classname - Velocity configuration class to load

setOut

public void setOut(File outFile)
Sets an output file

Parameters:
outFile - output file

setIn

public void setIn(File inFile)
Sets an input xml file to be styled

Parameters:
inFile - input file

setOutputEncoding

public void setOutputEncoding(String encoding)
Sets the character encoding for output files. If not specified, output is written with UTF-8 encodin6g.

Parameters:
encoding - Output encoding

setClasspath

public void setClasspath(Path classpath)
Set the classpath to load the Processor through (attribute).

Parameters:
classpath - classpath to set

createClasspath

public Path createClasspath()
Set the classpath to load the Processor through (nested element).


setClasspathRef

public void setClasspathRef(Reference r)
Set the classpath to load the Processor through via reference (attribute).

Parameters:
r - reference to classpath

setValidatingParser

public void setValidatingParser(boolean validating)
Sets the flag to have DVSL use a validating parser for the input documents


putAppValue

public void putAppValue(String name,
                        Object o)
Sets an application value from outside of the DVSL task


createTool

public DVSLTask.Tool createTool()
support for <tool> nested element


createVelConfig

public DVSLTask.VelocityConfig createVelConfig()
support for <velconfig> nested element



Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.