org.apache.tools.ant.taskdefs.optional
Class TraXLiaison
java.lang.Object
org.apache.tools.ant.taskdefs.optional.TraXLiaison
- ErrorListener, XSLTLiaison, XSLTLiaison2, XSLTLiaison3, XSLTLoggerAware
public class TraXLiaison
extends java.lang.Object
Concrete liaison for XSLT processor implementing TraX. (ie JAXP 1.1)
void | addParam(String name, String value) - Add a parameter.
|
void | configure(XSLTProcess xsltTask) - Specific configuration for the TRaX liaison.
|
void | error(TransformerException e) - Log an error.
|
void | fatalError(TransformerException e) - Log a fatal error.
|
protected String | getSystemId(File file) - since 1.5.x.
|
void | setAttribute(String name, Object value) - Set a custom attribute for the JAXP factory implementation.
|
void | setEntityResolver(EntityResolver aResolver) - Set the class to resolve entities during the transformation.
|
void | setFactory(String name) - Set the factory name to use instead of JAXP default lookup.
|
void | setLogger(XSLTLogger l) - Set a logger.
|
void | setOutputProperty(String name, String value) - Set the output property for the current transformer.
|
void | setStylesheet(File stylesheet) - Set the stylesheet file.
|
void | setStylesheet(Resource stylesheet) - Set the stylesheet file.
|
void | setURIResolver(URIResolver aResolver) - Set the class to resolve URIs during the transformation
|
void | transform(File infile, File outfile) - Transform an input file.
|
void | warning(TransformerException e) - Log a warning.
|
TraXLiaison
public TraXLiaison()
throws Exception
Constructor for TraXLiaison.
addParam
public void addParam(String name,
String value)
Add a parameter.
- addParam in interface XSLTLiaison
name
- the name of the parametervalue
- the value of the parameter
configure
public void configure(XSLTProcess xsltTask)
Specific configuration for the TRaX liaison.
- configure in interface XSLTLiaison2
xsltTask
- the XSLTProcess task instance from which this liasion
is to be configured.
error
public void error(TransformerException e)
Log an error.
e
- the exception to log.
fatalError
public void fatalError(TransformerException e)
Log a fatal error.
e
- the exception to log.
getSystemId
protected String getSystemId(File file)
since 1.5.x.
Use org.apache.tools.ant.util.JAXPUtils#getSystemId instead.
file
- the filename to use for the systemid
setAttribute
public void setAttribute(String name,
Object value)
Set a custom attribute for the JAXP factory implementation.
name
- the attribute name.value
- the value of the attribute, usually a boolean
string or object.
setEntityResolver
public void setEntityResolver(EntityResolver aResolver)
Set the class to resolve entities during the transformation.
aResolver
- the resolver class.
setFactory
public void setFactory(String name)
Set the factory name to use instead of JAXP default lookup.
name
- the fully qualified class name of the factory to use
or null for the default JAXP look up mechanism.
setOutputProperty
public void setOutputProperty(String name,
String value)
Set the output property for the current transformer.
Note that the stylesheet must be set prior to calling
this method.
name
- the output property name.value
- the output property value.
setStylesheet
public void setStylesheet(File stylesheet)
throws Exception
Set the stylesheet file.
- setStylesheet in interface XSLTLiaison
stylesheet
- a File
value
setURIResolver
public void setURIResolver(URIResolver aResolver)
Set the class to resolve URIs during the transformation
aResolver
- a EntityResolver
value
transform
public void transform(File infile,
File outfile)
throws Exception
Transform an input file.
- transform in interface XSLTLiaison
infile
- the file to transformoutfile
- the result file
warning
public void warning(TransformerException e)
Log a warning.
e
- the exception to log.