Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
public class: XSLTProcess [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.MatchingTask
            org.apache.tools.ant.taskdefs.XSLTProcess

All Implemented Interfaces:
    XSLTLogger, SelectorContainer, Cloneable

Processes a set of XML documents via XSLT. This is useful for building views of XML based documentation.
Nested Class Summary:
public static class  XSLTProcess.Param  The Param inner class used to store XSL parameters 
public static class  XSLTProcess.OutputProperty  Specify how the result tree should be output as specified in the specification
public static class  XSLTProcess.Factory  The factory element to configure a transformer factory 
Field Summary
public static final  String PROCESSOR_TRAX    The default processor is trax
    since: Ant - 1.7
 
Fields inherited from org.apache.tools.ant.taskdefs.MatchingTask:
fileset
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Constructor:
 public XSLTProcess() 
Method from org.apache.tools.ant.taskdefs.XSLTProcess Summary:
add,   add,   addConfiguredStyle,   addConfiguredXMLCatalog,   addMapper,   configureLiaison,   configureLiaison,   createClasspath,   createFactory,   createOutputProperty,   createParam,   execute,   getFactory,   getLiaison,   getOutputProperties,   getXMLCatalog,   init,   setBasedir,   setClasspath,   setClasspathRef,   setDestdir,   setExtension,   setFileDirParameter,   setFileNameParameter,   setForce,   setIn,   setOut,   setProcessor,   setReloadStylesheet,   setScanIncludedDirectories,   setStyle,   setUseImplicitFileset,   setXslResource
Methods from org.apache.tools.ant.taskdefs.MatchingTask:
XsetIgnore,   XsetItems,   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
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.XSLTProcess Detail:
 public  void add(ResourceCollection rc) 
    Adds a collection of resources to style in addition to the given file or the implicit fileset.
 public  void add(FileNameMapper fileNameMapper) throws BuildException 
    Adds a nested filenamemapper.
 public  void addConfiguredStyle(Resources rc) 
    Add a nested <style> element.
 public  void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) 
    Add the catalog to our internal catalog
 public  void addMapper(Mapper mapper) 
    Defines the mapper to map source to destination files.
 protected  void configureLiaison(File stylesheet) throws BuildException 
Deprecated! since - Ant 1.7

    Loads the stylesheet and set xsl:param parameters.
 protected  void configureLiaison(Resource stylesheet) throws BuildException 
    Loads the stylesheet and set xsl:param parameters.
 public Path createClasspath() 
    Set the optional classpath to the XSL processor
 public XSLTProcess.Factory createFactory() throws BuildException 
    Create the factory element to configure a trax liaison.
 public XSLTProcess.OutputProperty createOutputProperty() 
    Create an instance of an output property to be configured.
 public XSLTProcess.Param createParam() 
    Create an instance of an XSL parameter for configuration by Ant.
 public  void execute() throws BuildException 
    Executes the task.
 public XSLTProcess.Factory getFactory() 
    Get the factory instance configured for this processor
 protected XSLTLiaison getLiaison() 
    Get the Liason implementation to use in processing.
 public Enumeration getOutputProperties() 
    Get an enumeration on the outputproperties.
 public XMLCatalog getXMLCatalog() 
    Get the XML catalog containing entity definitions
 public  void init() throws BuildException 
    Initialize internal instance of XMLCatalog
 public  void setBasedir(File dir) 
    Set the base directory; optional, default is the project's basedir.
 public  void setClasspath(Path classpath) 
    Set the optional classpath to the XSL processor
 public  void setClasspathRef(Reference r) 
    Set the reference to an optional classpath to the XSL processor
 public  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.
 public  void setExtension(String name) 
    Set the desired file extension to be used for the target; optional, default is html.
 public  void setFileDirParameter(String fileDirParameter) 
    Pass the directory name of the current processed file as a xsl parameter to the transformation. This value sets the name of that xsl parameter.
 public  void setFileNameParameter(String fileNameParameter) 
    Pass the filename of the current processed file as a xsl parameter to the transformation. This value sets the name of that xsl parameter.
 public  void setForce(boolean force) 
    Set whether to check dependencies, or always generate; optional, default is false.
 public  void setIn(File inFile) 
    specifies a single XML document to be styled. Should be used with the out attribute; ; required if out is set
 public  void setOut(File outFile) 
    Specifies the output name for the styled result from the in attribute; required if in is set
 public  void setProcessor(String processor) 
    Set the name of the XSL processor to use; optional, default trax. Other values are "xalan" for Xalan1
 public  void setReloadStylesheet(boolean b) 
    Controls whether the stylesheet is reloaded for every transform.

    Setting this to true may get around a bug in certain Xalan-J versions, default is false.

 public  void setScanIncludedDirectories(boolean b) 
    Whether to style all files in the included directories as well; optional, default is true.
 public  void setStyle(String xslFile) 
    Name of the stylesheet to use - given either relative to the project's basedir or as an absolute path; required.
 public  void setUseImplicitFileset(boolean useimplicitfileset) 
    Whether to use the implicit fileset.

    Set this to false if you want explicit control with nested resource collections.

 public  void setXslResource(Resource xslResource) 
    API method to set the XSL Resource.