|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sweetohm.ant.util.FileTask
net.sweetohm.ant.xml.XTask
public class XTask
XTask is an XSLT task using XT from James Clark.
Field Summary | |
---|---|
(package private) java.util.Vector |
args
The argument list |
(package private) java.lang.String |
extension
Extension for processed files (defaults to .html) |
(package private) boolean |
force
Force flag. |
(package private) static com.jclark.xsl.sax.OutputMethodHandlerImpl |
handler
Output handler for the XT processor |
(package private) java.lang.String |
style
The stylesheet to use to process files |
(package private) java.lang.String |
todir
The destination directory for transformed files |
(package private) java.lang.String |
tofile
The transformed file. |
(package private) static com.jclark.xsl.sax.XSLProcessorImpl |
xslprocessor
XT processor. |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, 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. |
protected static org.xml.sax.InputSource |
getInputSource(java.io.File file)
Creates imput source |
protected static org.xml.sax.Parser |
getParser()
Builds the SAX parser for XT. |
(package private) void |
printSAXParseException(org.xml.sax.SAXParseException e)
Print the SAX error message. |
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.sweetohm.ant.util.FileTask |
---|
addFileset, getFiles, setDir, setFile |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static com.jclark.xsl.sax.XSLProcessorImpl xslprocessor
static com.jclark.xsl.sax.OutputMethodHandlerImpl handler
java.lang.String style
java.lang.String todir
java.lang.String tofile
java.lang.String extension
java.util.Vector args
boolean force
Constructor Detail |
---|
public XTask()
Method Detail |
---|
public void setStyle(java.lang.String style)
style
- The stylesheet to use.public void setTodir(java.lang.String todir)
todir
- The directory for processed files.public void setTofile(java.lang.String tofile)
tofile
- The processed files.public void setExtension(java.lang.String extension)
extension
- The extension to append to the generated file.public void addArg(Arg arg)
arg
- The argument to pass to the processor.public void setForce(boolean force)
force
- The force tag. If true
, the file is
generated even if the xml or xsl are older.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
protected static org.xml.sax.Parser getParser()
Parser
class is
deprecated, but XT only knows anout those parsers. Note that the
Parser
class is deprecated, but we have no choice as
XT uses it.
protected static org.xml.sax.InputSource getInputSource(java.io.File file)
fileName
- the file name for this source
public void warning(org.xml.sax.SAXParseException e)
warning
in interface org.xml.sax.ErrorHandler
public void error(org.xml.sax.SAXParseException e)
error
in interface org.xml.sax.ErrorHandler
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
void printSAXParseException(org.xml.sax.SAXParseException e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |