org.apache.tools.ant.taskdefs.XSLTLoggerpublic class AntTransform
extends org.apache.tools.ant.taskdefs.MatchingTask
implements org.apache.tools.ant.taskdefs.XSLTLogger
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AntTransform.OutputProperty |
Specify how the result tree should be output as specified
in the Serialization specification.
|
static class |
AntTransform.Param |
The Param inner class used to store XSL parameters
|
| Constructor | Description |
|---|---|
AntTransform() |
Create a new saxon-xslt Task.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(org.apache.tools.ant.types.ResourceCollection rc) |
Adds a collection of resources to style in addition to the
given file or the implicit fileset.
|
void |
add(org.apache.tools.ant.util.FileNameMapper fileNameMapper) |
Adds a nested filenamemapper.
|
void |
addConfiguredStyle(org.apache.tools.ant.types.resources.Resources rc) |
Add a nested <style> element.
|
void |
addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog) |
Add the catalog to our internal catalog
|
void |
addMapper(org.apache.tools.ant.types.Mapper mapper) |
Defines the mapper to map source to destination files.
|
protected void |
configureLiaison(java.io.File stylesheet) |
Deprecated.
since Ant 1.7
|
protected void |
configureLiaison(org.apache.tools.ant.types.Resource stylesheet) |
Loads the stylesheet and set xsl:param parameters.
|
org.apache.tools.ant.types.Path |
createClasspath() |
Set the optional classpath to the XSL processor
|
AntTransform.OutputProperty |
createOutputProperty() |
Create an instance of an output property to be configured.
|
AntTransform.Param |
createParam() |
Create an instance of an XSL parameter for configuration by Ant.
|
void |
execute() |
Executes the task.
|
Configuration |
getConfiguration() |
Get the Saxon Configuration being used (useful for subclasses)
|
java.util.Enumeration |
getOutputProperties() |
Get an enumeration on the outputproperties.
|
org.apache.tools.ant.types.XMLCatalog |
getXMLCatalog() |
Get the XML catalog containing entity definitions
|
void |
init() |
Initialize internal instance of XMLCatalog
|
void |
setBasedir(java.io.File dir) |
Set the base directory;
optional, default is the project's basedir.
|
void |
setClasspath(org.apache.tools.ant.types.Path classpath) |
Set the optional classpath to the XSL processor
|
void |
setClasspathRef(org.apache.tools.ant.types.Reference r) |
Set the reference to an optional classpath to the XSL processor
|
void |
setDestdir(java.io.File dir) |
Set the destination directory into which the XSL result
files should be copied to;
required, unless in and out are
specified.
|
void |
setDTDValidation(boolean validation) |
Indicate whether DTD validation is on or off
|
void |
setExpandDefaults(boolean expand) |
Set whether DTD or schema-defined element and attribute default values should be expanded
Default is true
|
void |
setExtension(java.lang.String name) |
Set the desired file extension to be used for the target;
optional, default is html.
|
void |
setFileDirParameter(java.lang.String fileDirParameter) |
Pass the directory name of the current processed file as a xsl parameter
to the transformation.
|
void |
setFileNameParameter(java.lang.String fileNameParameter) |
Pass the filename of the current processed file as a xsl parameter
to the transformation.
|
void |
setForce(boolean force) |
Set whether to check dependencies, or always generate;
optional, default is false.
|
void |
setIn(java.io.File inFile) |
specifies a single XML document to be styled.
|
void |
setInitialMode(java.lang.String mode) |
Set the initial mode
|
void |
setInitialTemplate(java.lang.String name) |
Set the initial template
|
void |
setLineNumbering(boolean numbering) |
Set whether to maintain line numbers for input documents
|
void |
setOut(java.io.File outFile) |
Specifies the output name for the styled result from the
in attribute; required if in is set
|
void |
setRecoveryPolicy(java.lang.String policy) |
Set the policy for handling recoverable errors
|
void |
setReloadStylesheet(boolean b) |
Controls whether the stylesheet is reloaded for every transform.
|
void |
setScanIncludedDirectories(boolean b) |
Set whether to style all files in the included directories as well;
optional, default is true.
|
void |
setSchemaAware(boolean schemaAware) |
Indicate whether schema-aware processing is required
|
void |
setSchemaValidation(java.lang.String validation) |
Indicate whether schema validation for all input files to the transformation is strict, lax, or skip
|
void |
setStyle(java.lang.String xslFile) |
Name of the stylesheet to use - given either relative
to the project's basedir or as an absolute path; required.
|
void |
setTracing(boolean tracing) |
Set whether to trace stylesheet execution
|
void |
setUseImplicitFileset(boolean useimplicitfileset) |
Set whether to use the implicit fileset.
|
void |
setXmlVersion(java.lang.String version) |
Set the XML version to be used for validating names
|
void |
setXslResource(org.apache.tools.ant.types.Resource xslResource) |
API method to set the XSL Resource.
|
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItemsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getDescription, getLocation, getProject, setDescription, setLocationbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setScanIncludedDirectories(boolean b)
b - true if files in included directories are processed.public void setReloadStylesheet(boolean b)
Setting this to true may get around a bug in certain Xalan-J versions, default is false.
b - a boolean valuepublic void addMapper(org.apache.tools.ant.types.Mapper mapper)
mapper - the mapper to useorg.apache.tools.ant.BuildException - if more than one mapper is definedpublic void add(org.apache.tools.ant.types.ResourceCollection rc)
rc - the collection of resources to stylepublic void addConfiguredStyle(org.apache.tools.ant.types.resources.Resources rc)
rc - the configured Resources object represented as <style>.public void setXslResource(org.apache.tools.ant.types.Resource xslResource)
xslResource - Resource to set as the stylesheet.public void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
throws org.apache.tools.ant.BuildException
fileNameMapper - the mapper to addorg.apache.tools.ant.BuildException - if more than one mapper is definedpublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - if there is an execution problem.public void setForce(boolean force)
force - true if always generate.public void setBasedir(java.io.File dir)
dir - the base directorypublic void setDestdir(java.io.File dir)
dir - the name of the destination directorypublic void setExtension(java.lang.String name)
name - the extension to usepublic void setStyle(java.lang.String xslFile)
xslFile - the stylesheet to usepublic void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath - the classpath to use when loading the XSL processorpublic org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
r - the id of the Ant path instance to act as the classpath
for loading the XSL processorpublic void setSchemaAware(boolean schemaAware)
schemaAware - true if schema-aware processing is requiredpublic void setSchemaValidation(java.lang.String validation)
validation - "strict", "lax" or "skip"public void setDTDValidation(boolean validation)
validation - set to true to request DTD validation of all input files to the transformationpublic void setExpandDefaults(boolean expand)
expand - true to expand default values, false if they are to be suppressedpublic void setInitialMode(java.lang.String mode)
mode - the initial mode for the transformation, in Clark notationpublic void setInitialTemplate(java.lang.String name)
name - the name of the initial template for the transformation, in Clark notationpublic void setRecoveryPolicy(java.lang.String policy)
policy - one of "silent", "recover", or "fatal". Default is "recover".public void setTracing(boolean tracing)
tracing - true to trace execution. Default is falsepublic void setLineNumbering(boolean numbering)
numbering - true to maintain line numbers. Default is falsepublic void setXmlVersion(java.lang.String version)
version - One of "1.0" or "1.1". Default is "1.0".public void setUseImplicitFileset(boolean useimplicitfileset)
Set this to false if you want explicit control with nested resource collections.
useimplicitfileset - set to true if you want to use implicit filesetpublic void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog xmlCatalog)
xmlCatalog - the XMLCatalog instance to use to look up DTDspublic void setFileNameParameter(java.lang.String fileNameParameter)
fileNameParameter - name of the xsl parameter retrieving the
current file namepublic void setFileDirParameter(java.lang.String fileDirParameter)
fileDirParameter - name of the xsl parameter retrieving the
current file directorypublic void setOut(java.io.File outFile)
outFile - the output File instance.public void setIn(java.io.File inFile)
inFile - the input filepublic Configuration getConfiguration()
public org.apache.tools.ant.types.XMLCatalog getXMLCatalog()
public java.util.Enumeration getOutputProperties()
public AntTransform.Param createParam()
public AntTransform.OutputProperty createOutputProperty()
public void init()
throws org.apache.tools.ant.BuildException
init in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - on errorprotected void configureLiaison(java.io.File stylesheet)
throws org.apache.tools.ant.BuildException
stylesheet - the file from which to load the stylesheet.org.apache.tools.ant.BuildException - if the stylesheet cannot be loaded.protected void configureLiaison(org.apache.tools.ant.types.Resource stylesheet)
throws org.apache.tools.ant.BuildException
stylesheet - the resource from which to load the stylesheet.org.apache.tools.ant.BuildException - if the stylesheet cannot be loaded.