|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sweetohm.ant.util.FileTask
net.sweetohm.ant.xml.ValidTask
public class ValidTask
Valid is an XML validator (can check well formness and validity).
Nested Class Summary | |
---|---|
(package private) class |
ValidTask.Handler
A class to handle parsing errors. |
(package private) class |
ValidTask.SAXParsingInterruptedException
This exception is thrown when the parsing is interrupted due to to a number of errors greater than the allowed maximum. |
Field Summary | |
---|---|
(package private) boolean |
dtd
DTD loading flag |
(package private) static int |
ERROR
|
(package private) int |
errorCount
The number of errors |
(package private) int |
errorlevel
|
(package private) boolean |
failonerror
Fail on error flag. |
(package private) static int |
FATAL
|
(package private) static java.lang.String |
FILE
The file prefix for system ID |
(package private) int |
maxerrors
The maximum number of errors |
(package private) static int |
WARNING
The error level to generate an error: - warning [0]: a warning is an error (shown and may stop processing). |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
ValidTask()
|
Method Summary | |
---|---|
void |
execute()
Executes the task. |
(package private) javax.xml.parsers.SAXParser |
getParser()
Builds the SAX parser for parsing. |
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. |
Methods inherited from class net.sweetohm.ant.util.FileTask |
---|
addFileset, getFiles, setDir, setFile |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
boolean dtd
boolean failonerror
static final int WARNING
static final int ERROR
static final int FATAL
int errorlevel
static final java.lang.String FILE
int errorCount
int maxerrors
Constructor Detail |
---|
public ValidTask()
Method Detail |
---|
public void setDtd(boolean dtd)
dtd
- a boolean
valuepublic void setFailonerror(boolean failonerror)
failonerror
- Flag for failonerror flag.public void setErrorlevel(java.lang.String errorlevel)
errorlevel
- The error level.public void setMaxerrors(java.lang.String maxerrors)
maxerrors
- The maximum number of errors to display for
a given file.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if an error occursjavax.xml.parsers.SAXParser getParser()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |