org.outerj.ant
Class XmlSchemaTask

java.lang.Object
  extended byTask
      extended byorg.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
           
 
Constructor Summary
XmlSchemaTask()
           
 
Method Summary
 void addFileset(FileSet set)
           
 void error(org.xml.sax.SAXParseException exception)
           
 void execute()
           
 void fatalError(org.xml.sax.SAXParseException exception)
           
 java.lang.String formatException(org.xml.sax.SAXParseException e)
           
 void setFile(java.io.File file)
           
 void setXmlSchemaFile(java.lang.String xmlSchemaFileName)
           
 void validate(java.io.File file)
           
 void warning(org.xml.sax.SAXParseException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

success

protected boolean success
Constructor Detail

XmlSchemaTask

public XmlSchemaTask()
Method Detail

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)