Google

TraXLiaison (Apache Ant API)

org.apache.tools.ant.taskdefs.optional
Class TraXLiaison


java.lang.Object

  |

  +--org.apache.tools.ant.taskdefs.optional.TraXLiaison


Concrete liaison for XSLT processor implementing TraX. (ie JAXP 1.1)

Since:
Ant 1.3
Author:
Sam Ruby
, Davanum Srinivas , Stephane Bailliez

Field Summary
 
Fields inherited from interface org.apache.tools.ant.taskdefs.XSLTLiaison
FILE_PROTOCOL_PREFIX
 
Constructor Summary
TraXLiaison()
           
 
           
           
          Set the class to resolve entities during the transformation
          Set the class to resolve URIs during the transformation
           
Method Summary
 void addParam(java.lang.String name, java.lang.String value)
          Add a parameter to be set during the XSL transformation.
 void
 void
protected  java.lang.String getSystemId(java.io.File file)
           
 void
 void setLogger(XSLTLogger l)
           
 void setOutputProperty(java.lang.String name, java.lang.String value)
          Set the output property for the current transformer.
 void setStylesheet(java.io.File stylesheet)
          set the stylesheet to use for the transformation.
 void
 void transform(java.io.File infile, java.io.File outfile)
          Perform the transformation of a file into another.
 void
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraXLiaison


public TraXLiaison()
            throws java.lang.Exception
Method Detail

setOutputProperty


public void setOutputProperty(java.lang.String name,
                              java.lang.String value)
Set the output property for the current transformer. Note that the stylesheet must be set prior to calling this method.

Parameters:
name - the output property name.
value - the output property value.

setStylesheet


public void setStylesheet(java.io.File stylesheet)
                   throws java.lang.Exception
Description copied from interface: XSLTLiaison
set the stylesheet to use for the transformation.

Specified by:
setStylesheet in interface XSLTLiaison
Parameters:
stylesheet - the stylesheet to be used for transformation.
java.lang.Exception

transform


public void transform(java.io.File infile,
                      java.io.File outfile)
               throws java.lang.Exception
Description copied from interface: XSLTLiaison
Perform the transformation of a file into another.

Specified by:
transform in interface XSLTLiaison
Parameters:
infile - the input file, probably an XML one. :-)
outfile - the output file resulting from the transformation
Throws:
java.lang.Exception - thrown if any problems happens.
See Also:
XSLTLiaison.setStylesheet(File)

getSystemId


protected java.lang.String getSystemId(java.io.File file)

addParam


public void addParam(java.lang.String name,
                     java.lang.String value)
Description copied from interface: XSLTLiaison
Add a parameter to be set during the XSL transformation.

Specified by:
addParam in interface XSLTLiaison
Parameters:
name - the parameter name.
value - the parameter value as an expression string.

setLogger


public void setLogger(XSLTLogger l)
Specified by:
setLogger in interface XSLTLoggerAware

error



fatalError



warning



setEntityResolver


Set the class to resolve entities during the transformation


setURIResolver


Set the class to resolve URIs during the transformation



Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.