|
org.apache.tools.ant.taskdefs.optional
|
Nested Class Summary | |
protected class |
XMLValidateTask.ValidatorErrorHandler
ValidatorErrorHandler role : log SAX parse exceptions, remember if an error occured |
Field Summary | |
protected Path |
classpath
|
protected XMLValidateTask.ValidatorErrorHandler |
errorHandler
|
protected boolean |
failOnError
|
protected java.util.Hashtable |
features
|
protected java.io.File |
file
|
protected java.util.Vector |
filesets
|
protected static java.lang.String |
INIT_FAILED_MSG
|
protected boolean |
lenient
|
protected java.lang.String |
readerClassName
|
protected boolean |
warn
|
the parser is viewed as a SAX2 XMLReader. |
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 | |
XMLValidateTask()
|
Method Summary | |
void |
addConfiguredXMLCatalog(XMLCatalog catalog)
add an XMLCatalog as a nested element; optional. |
void |
addFileset(FileSet set)
specify a set of file to be checked |
Path |
createClasspath()
|
DTDLocation |
createDTD()
Create a DTD location record; optional. |
void |
execute()
Called by the project to let the task do its work. |
getEntityResolver()
|
|
void |
init()
Called by the project to let the task initialize properly. |
void |
setClassName(java.lang.String className)
Specify the class name of the SAX parser to be used. |
void |
setClasspath(Path classpath)
Specify the classpath to be searched to load the parser (optional) |
void |
setClasspathRef(Reference r)
Where to find the parser class; optional. |
void |
setFailOnError(boolean fail)
Specify how parser error are to be handled; optional, default=true |
void |
setFile(java.io.File file)
specify the file to be checked; optional. |
void |
setLenient(boolean bool)
Specify whether the parser should be validating. |
void |
setWarn(boolean bool)
Specify how parser error are to be handled. |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, isInvalid, 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 |
Field Detail |
protected static java.lang.String INIT_FAILED_MSG
protected boolean failOnError
protected boolean warn
protected boolean lenient
protected java.lang.String readerClassName
protected java.io.File file
protected java.util.Vector filesets
protected Path classpath
protected XMLValidateTask.ValidatorErrorHandler errorHandler
protected java.util.Hashtable features
Constructor Detail |
public XMLValidateTask()
Method Detail |
public void setFailOnError(boolean fail)
If set to true
(default), throw a buildException if the parser yields an error.
public void setWarn(boolean bool)
If set to
true (default), log a warn message for each SAX warn event.
public void setLenient(boolean bool)
true
.
If set to false, the validation will fail only if the parsed document is not well formed XML.
this option is ignored if the specified class with setClassName(String)
is not a SAX2
XMLReader.
public void setClassName(java.lang.String className)
if not set, the default #DEFAULT_XML_READER_CLASSNAME
will be used.
XMLReader
,
Parser
public void setClasspath(Path classpath)
public Path createClasspath()
public void setClasspathRef(Reference r)
public void setFile(java.io.File file)
public void addConfiguredXMLCatalog(XMLCatalog catalog)
public void addFileset(FileSet set)
public void init() throws BuildException
Task
BuildException
- if someting goes wrong with the buildpublic DTDLocation createDTD()
public void execute() throws BuildException
Task
BuildException
- if something goes wrong with the build
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |