org.apache.tools.ant.taskdefs
Class XSLTProcess

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

public class XSLTProcess
extends MatchingTask

A Task to process via XSLT a set of XML documents. This is useful for building views of XML based documentation. arguments:

Of these arguments, the sourcedir and destdir are required.

This task will recursively scan the sourcedir and destdir looking for XML documents to process via XSLT. Any other files, such as images, or html files in the source directory will be copied into the destination directory.

Version:
$Revision: 1.23.2.2 $ $Date: 2001/08/21 20:25:22 $
Author:
Keith Visco, Sam Ruby, Russell Gold, Stefan Bodewig

Inner Class Summary
 class XSLTProcess.Param
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
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
XSLTProcess()
          Creates a new XSLTProcess Task.
 
Method Summary
protected  void configureLiaison(java.io.File stylesheet)
          Loads the stylesheet and set xsl:param parameters.
 Path createClasspath()
          Set the classpath to load the Processor through (nested element).
 XSLTProcess.Param createParam()
           
 void execute()
          Executes the task.
protected  XSLTLiaison getLiaison()
           
 void setBasedir(java.io.File dir)
          Set the base directory.
 void setClasspath(Path classpath)
          Set the classpath to load the Processor through (attribute).
 void setClasspathRef(Reference r)
          Set the classpath to load the Processor through via reference (attribute).
 void setDestdir(java.io.File dir)
          Set the destination directory into which the XSL result files should be copied to
 void setExtension(java.lang.String name)
          Set the desired file extension to be used for the target
 void setForce(boolean force)
          Set whether to check dependencies, or always generate.
 void setIn(java.io.File inFile)
          Sets an input xml file to be styled
 void setOut(java.io.File outFile)
          Sets an out file
 void setProcessor(java.lang.String processor)
           
 void setStyle(java.lang.String xslFile)
          Sets the file to use for styling relative to the base directory of this task.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems
 
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

XSLTProcess

public XSLTProcess()
Creates a new XSLTProcess Task.
Method Detail

execute

public void execute()
             throws BuildException
Executes the task.
Overrides:
execute in class Task
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build

setForce

public void setForce(boolean force)
Set whether to check dependencies, or always generate.

setBasedir

public void setBasedir(java.io.File dir)
Set the base directory.

setDestdir

public void setDestdir(java.io.File dir)
Set the destination directory into which the XSL result files should be copied to
Parameters:
dirName - the name of the destination directory

setExtension

public void setExtension(java.lang.String name)
Set the desired file extension to be used for the target
Parameters:
name - the extension to use

setStyle

public void setStyle(java.lang.String xslFile)
Sets the file to use for styling relative to the base directory of this task.

setClasspath

public void setClasspath(Path classpath)
Set the classpath to load the Processor through (attribute).

createClasspath

public Path createClasspath()
Set the classpath to load the Processor through (nested element).

setClasspathRef

public void setClasspathRef(Reference r)
Set the classpath to load the Processor through via reference (attribute).

setProcessor

public void setProcessor(java.lang.String processor)

setOut

public void setOut(java.io.File outFile)
Sets an out file

setIn

public void setIn(java.io.File inFile)
Sets an input xml file to be styled

getLiaison

protected XSLTLiaison getLiaison()

createParam

public XSLTProcess.Param createParam()

configureLiaison

protected void configureLiaison(java.io.File stylesheet)
                         throws BuildException
Loads the stylesheet and set xsl:param parameters.


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.