net.cafebabe.sat.xml
Class ValidTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--net.cafebabe.sat.util.FileTask
                    |
                    +--net.cafebabe.sat.xml.ValidTask

public class ValidTask
extends FileTask

Valid is an XML validator (can check well formness and validity).

Author:
Michel CASABIANCA

Field Summary
 
Fields inherited from class net.cafebabe.sat.util.FileTask
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ValidTask()
           
 
Method Summary
 void execute()
          Executes the task.
 void setDtd(boolean dtd)
          Setter for the DTD loading.
 void setErrorlevel(java.lang.String errorlevel)
          Error level setter (possible values are 'warning', 'error' or 'fatal').
 void setFailonerror(boolean failonerror)
          Setter for the failonerror flag.If true, the Ant compilation stops with an error message if the document being validated is not valid.
 void setMaxerrors(java.lang.String maxerrors)
          Maximum errors setter.
 void setTimeFile(java.lang.String file)
          Set file for date reference.
 
Methods inherited from class net.cafebabe.sat.util.FileTask
addFileset, getFiles, getNewFiles, newerFilesThan, setDir, setFile
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidTask

public ValidTask()
Method Detail

setDtd

public void setDtd(boolean dtd)
Setter for the DTD loading. If true, the DTD is loaded for validation. Defaults to true.

Parameters:
dtd - a boolean value

setFailonerror

public void setFailonerror(boolean failonerror)
Setter for the failonerror flag.If true, the Ant compilation stops with an error message if the document being validated is not valid. Defaults to true.

Parameters:
failonerror - Flag for failonerror flag.

setErrorlevel

public void setErrorlevel(java.lang.String errorlevel)
Error level setter (possible values are 'warning', 'error' or 'fatal'). The default value is 'fatal'.

Parameters:
errorlevel - The error level.

setMaxerrors

public void setMaxerrors(java.lang.String maxerrors)
Maximum errors setter.

Parameters:
maxerrors - The maximum number of errors to display for a given file.

setTimeFile

public void setTimeFile(java.lang.String file)
Set file for date reference.

Parameters:
file - The reference file as a String

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if an error occurs