net.cafebabe.sat.xml
Class XTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--net.cafebabe.sat.util.FileTask
                    |
                    +--net.cafebabe.sat.xml.XTask
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class XTask
extends FileTask
implements org.xml.sax.ErrorHandler

XTask is an XSLT task using XT from James Clark.

Author:
Michel CASABIANCA

Field Summary
 
Fields inherited from class net.cafebabe.sat.util.FileTask
 
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
XTask()
           
 
Method Summary
 void addArg(Arg arg)
          Add an argument for the processor.
 void error(org.xml.sax.SAXParseException e)
          Manage errors.
 void execute()
          Executes the task.
 void fatalError(org.xml.sax.SAXParseException e)
          Manage fatal errors.
 void setExtension(java.lang.String extension)
          Extension setter.
 void setForce(boolean force)
          Setter for the force flag.
 void setStyle(java.lang.String style)
          Setter for the stylesheet to use for processing.
 void setTodir(java.lang.String todir)
          Setter for the output directory for processed files.
 void setTofile(java.lang.String tofile)
          Setter for the destination file.
 void warning(org.xml.sax.SAXParseException e)
          Manage warnings.
 
Methods inherited from class net.cafebabe.sat.util.FileTask
addFileset, getFiles, getNewFiles, newerFilesThan, setDir, setFile
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, 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
 

Constructor Detail

XTask

public XTask()
Method Detail

setStyle

public void setStyle(java.lang.String style)
Setter for the stylesheet to use for processing.

Parameters:
style - The stylesheet to use.

setTodir

public void setTodir(java.lang.String todir)
Setter for the output directory for processed files.

Parameters:
todir - The directory for processed files.

setTofile

public void setTofile(java.lang.String tofile)
Setter for the destination file.

Parameters:
tofile - The processed files.

setExtension

public void setExtension(java.lang.String extension)
Extension setter.

Parameters:
extension - The extension to append to the generated file.

addArg

public void addArg(Arg arg)
Add an argument for the processor.

Parameters:
arg - The argument to pass to the processor.

setForce

public void setForce(boolean force)
Setter for the force flag.

Parameters:
force - The force tag. If true, the file is generated even if the xml or xsl are older.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task.

Overrides:
execute in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException

warning

public void warning(org.xml.sax.SAXParseException e)
Manage warnings. Implements ErrorHandler interface.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
e - The parsing as a SAXParseException
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException e)
Manage errors. Implements ErrorHandler interface.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
e - The parsing as a SAXParseException
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Manage fatal errors. Implements ErrorHandler interface.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
e - The parsing as a SAXParseException
Throws:
org.xml.sax.SAXException