org.progeeks.tool.xml
Class XmlValidatorTask

java.lang.Object
  extended by Task
      extended by org.progeeks.tool.xml.XmlValidatorTask

public class XmlValidatorTask
extends Task

ANT task for running the XmlValidator.

Version:
$Revision: 1.5 $
Author:
Paul Speed

Constructor Summary
XmlValidatorTask()
           
 
Method Summary
 void addFileSet(FileSet fileSet)
           
 Path createClasspath()
           
protected  void error(java.lang.String message, java.lang.Throwable t)
           
 void execute()
           
 java.io.File getConfig()
           
 void init()
           
protected  java.lang.Object loadValidator()
          Loads the validator to use for checking the XML.
 void setClasspath(Path path)
           
 void setClasspathRef(Reference reference)
           
 void setConfig(java.io.File config)
           
protected  int validate(java.lang.Object validator, java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlValidatorTask

public XmlValidatorTask()
Method Detail

init

public void init()

setConfig

public void setConfig(java.io.File config)

getConfig

public java.io.File getConfig()

setClasspath

public void setClasspath(Path path)

setClasspathRef

public void setClasspathRef(Reference reference)

createClasspath

public Path createClasspath()

addFileSet

public void addFileSet(FileSet fileSet)

error

protected void error(java.lang.String message,
                     java.lang.Throwable t)

loadValidator

protected java.lang.Object loadValidator()
Loads the validator to use for checking the XML. Care is taken to use the configured classpath and handle the returned loader since its instance may be loaded from a different classloader than the one we'd see locally. So we'll have to tread the loader with kid gloves along with any information it returns.


validate

protected int validate(java.lang.Object validator,
                       java.io.File file)

execute

public void execute()
             throws BuildException
Throws:
BuildException


Copyright © 2002-2003 Paul Speed. All Rights Reserved.