public class Transform extends Object
getResultXXX method, and Templates are not used.| Constructor and Description |
|---|
Transform(InputSource input,
File stylesheet)
Create a transformation using InputSource input XML and
stylesheet in a File
|
Transform(InputSource input,
InputSource stylesheet)
Create a transformation using InputSource input XML and
InputSource stylesheet
|
Transform(Node sourceNode)
Create a transformation that allows us to serialize a DOM Node
|
Transform(Node sourceNode,
File stylesheet)
Create a transformation from an input Node and stylesheet in a File
|
Transform(Node sourceNode,
String stylesheet)
Create a transformation from an input Node and stylesheet in a String
|
Transform(Source inputSource,
Source stylesheetSource)
Create a transformation using Source input XML and Source stylesheet
|
Transform(String input,
File stylesheet)
Create a transformation using String input XML and stylesheet in a File
|
Transform(String input,
String stylesheet)
Create a transformation using String input XML and String stylesheet
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearParameters()
Clear parameters used for the transformation
|
Object |
getParameter(String name)
See a parameter used for the transformation
|
Document |
getResultDocument()
Perform the XSLT transformation specified in the constructor
|
String |
getResultString()
Perform the XSLT transformation specified in the constructor
|
void |
setErrorListener(ErrorListener errorListener)
Set the ErrorListener for the transformation
|
void |
setOutputProperties(Properties outputProperties)
Override output properties specified in the transformation stylesheet
|
void |
setOutputProperty(String name,
String value)
Override an output property specified in the transformation stylesheet
|
void |
setParameter(String name,
Object value)
Add a parameter for the transformation
|
void |
setURIResolver(URIResolver uriResolver)
Set the URIResolver for the transformation
|
protected void |
transformTo(Result result)
Perform the actual transformation
|
public Transform(String input, String stylesheet)
input - document to transformstylesheet - stylesheet to use for transformationpublic Transform(String input, File stylesheet)
input - document to transformstylesheet - stylesheet to use for transformationpublic Transform(InputSource input, InputSource stylesheet)
input - document to transformstylesheet - stylesheet to use for transformationpublic Transform(InputSource input, File stylesheet)
input - document to transformstylesheet - stylesheet to use for transformationpublic Transform(Node sourceNode)
sourceNode - document to transformpublic Transform(Node sourceNode, String stylesheet)
sourceNode - document to transformstylesheet - stylesheet to use for transformationpublic Transform(Node sourceNode, File stylesheet)
sourceNode - document to transformstylesheet - stylesheet to use for transformationprotected void transformTo(Result result) throws TransformerException
result - result to output transformation result toTransformerException - if transformation failspublic String getResultString() throws TransformerException
TransformerException - if transformation failspublic Document getResultDocument() throws TransformerException
TransformerException - if transformation failspublic void setOutputProperty(String name, String value)
name - name of the propertyvalue - value of the propertypublic void setOutputProperties(Properties outputProperties)
outputProperties - output propertiesTransformer.setOutputProperties(java.util.Properties)public void setParameter(String name, Object value)
name - name of the parametervalue - value of the parameterTransformer.setParameter(java.lang.String, java.lang.Object)public Object getParameter(String name)
name - name of the parameterTransformer.getParameter(java.lang.String)public void clearParameters()
Transformer.clearParameters()public void setURIResolver(URIResolver uriResolver)
uriResolver - resolver to useTransformer.setURIResolver(javax.xml.transform.URIResolver)public void setErrorListener(ErrorListener errorListener)
errorListener - error listener to useTransformer.setErrorListener(javax.xml.transform.ErrorListener)Copyright © 2001–2025 XMLUnit. All rights reserved.