org.outerj.ant
Class XmlSchemaTask
java.lang.Object
Task
org.outerj.ant.XmlSchemaTask
- All Implemented Interfaces:
- org.xml.sax.ErrorHandler
- public class XmlSchemaTask
- extends Task
- implements org.xml.sax.ErrorHandler
Ant task that validates a set of XML files against a specified XML Schema.
The XML Schema file is specified externally (only noNamespaceSchema's).
Requires the Xerces 2 parser.
- See Also:
- Serialized Form
Field Summary |
protected boolean |
success
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
success
protected boolean success
XmlSchemaTask
public XmlSchemaTask()
execute
public void execute()
throws BuildException
- Throws:
BuildException
setXmlSchemaFile
public void setXmlSchemaFile(java.lang.String xmlSchemaFileName)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
setFile
public void setFile(java.io.File file)
addFileset
public void addFileset(FileSet set)
validate
public void validate(java.io.File file)
throws org.xml.sax.SAXException,
java.io.IOException
- Throws:
org.xml.sax.SAXException
java.io.IOException
warning
public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
formatException
public java.lang.String formatException(org.xml.sax.SAXParseException e)