Top Description Fields Methods
org.apache.tools.ant.taskdefs

public Interface XSLTLiaison

Known Direct Subinterfaces
org.apache.tools.ant.taskdefs.XSLTLiaison2
Imports
java.io.File

Proxy interface for XSLT processors.
Since
Ant 1.1
See Also
XSLTProcess

Field Summary

Modifier and TypeField and Description
public static final String
FILE_PROTOCOL_PREFIX

the file protocol prefix for systemid.

Method Summary

Modifier and TypeMethod and Description
public void
addParam(String
the parameter name.
name
,
String
the parameter value as an expression string.
expression
)

Add a parameter to be set during the XSL transformation.

public void
setStylesheet(File
the stylesheet to be used for transformation.
stylesheet
)

set the stylesheet to use for the transformation.

public void
transform(File
the input file, probably an XML one. :-)
infile
,
File
the output file resulting from the transformation
outfile
)

Perform the transformation of a file into another.

Field Detail

FILE_PROTOCOL_PREFIXback to summary
public static final String FILE_PROTOCOL_PREFIX

the file protocol prefix for systemid. This file protocol must be appended to an absolute path. Typically: FILE_PROTOCOL_PREFIX + file.getAbsolutePath() Note that on Windows, an extra '/' must be appended to the protocol prefix so that there is always 3 consecutive slashes.

Since
Ant 1.4

Method Detail

addParamback to summary
public void addParam(String name, String expression) throws Exception

Add a parameter to be set during the XSL transformation.

Parameters
name:String

the parameter name.

expression:String

the parameter value as an expression string.

Exceptions
Exception:
thrown if any problems happens.
Since
Ant 1.3
See Also
XSLTLiaison4#addParam(java.lang.String, java.lang.Object)
setStylesheetback to summary
public void setStylesheet(File stylesheet) throws Exception

set the stylesheet to use for the transformation.

Parameters
stylesheet:File

the stylesheet to be used for transformation.

Exceptions
Exception:
thrown if any problems happens.
Since
Ant 1.4
transformback to summary
public void transform(File infile, File outfile) throws Exception

Perform the transformation of a file into another.

Parameters
infile:File

the input file, probably an XML one. :-)

outfile:File

the output file resulting from the transformation

Exceptions
Exception:
thrown if any problems happens.
Since
Ant 1.4
See Also
setStylesheet(File)