|
|||||||
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
org.apache.tools.ant.taskdefs.MatchingTask
net.sf.saxon.ant.AntTransform
public class AntTransform
Processes a set of XML documents via XSLT. This is useful for building views of XML based documentation. This task for running Saxon transformations within Ant is modelled on the standard Ant xslt task, and makes heavy reuse of its code.
Nested Class Summary | |
---|---|
static class |
AntTransform.OutputProperty
Specify how the result tree should be output as specified in the specification. |
static class |
AntTransform.Param
The Param inner class used to store XSL parameters |
Constructor Summary | |
---|---|
AntTransform()
Creates a new XSLTProcess Task. |
Method Summary | |
---|---|
void |
add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
Adds a nested filenamemapper. |
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 |
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. |
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. |
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(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(File dir)
Set the destination directory into which the XSL result files should be copied to; required, unless in and out are specified. |
void |
setExtension(String name)
Set the desired file extension to be used for the target; optional, default is html. |
void |
setFileDirParameter(String fileDirParameter)
Pass the directory name of the current processed file as a xsl parameter to the transformation. |
void |
setFileNameParameter(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(File inFile)
specifies a single XML document to be styled. |
void |
setOut(File outFile)
Specifies the output name for the styled result from the in attribute; required if in is set |
void |
setReloadStylesheet(boolean b)
Controls whether the stylesheet is reloaded for every transform. |
void |
setScanIncludedDirectories(boolean b)
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 |
setStyle(String xslFile)
Name of the stylesheet to use - given either relative to the project's basedir or as an absolute path; required. |
void |
setUseImplicitFileset(boolean useimplicitfileset)
Whether to use the implicit fileset. |
void |
setValidation(String validation)
Indicate whether validation is strict, lax, or skip |
void |
setXslResource(org.apache.tools.ant.types.Resource xslResource)
API method to set the XSL Resource. |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
---|
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, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, 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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tools.ant.taskdefs.XSLTLogger |
---|
log |
Constructor Detail |
---|
public AntTransform()
Method Detail |
---|
public 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 use
org.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 add
org.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.Task
org.apache.tools.ant.BuildException
- if there is an execution problem.public void setForce(boolean force)
force
- true if always generate.public void setBasedir(File dir)
dir
- the base directorypublic void setDestdir(File dir)
dir
- the name of the destination directorypublic void setExtension(String name)
name
- the extension to usepublic void setStyle(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 setValidation(String validation)
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(String fileNameParameter)
fileNameParameter
- name of the xsl parameter retrieving the
current file namepublic void setFileDirParameter(String fileDirParameter)
fileDirParameter
- name of the xsl parameter retrieving the
current file directorypublic void setOut(File outFile)
outFile
- the output File instance.public void setIn(File inFile)
inFile
- the input filepublic org.apache.tools.ant.types.XMLCatalog getXMLCatalog()
public 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.Task
org.apache.tools.ant.BuildException
- on error
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |