public class Transform
extends java.lang.Object
getResultXXX
method, and Templates are not used.Modifier and Type | Class and Description |
---|---|
(package private) static interface |
Transform.Trans<R> |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.Object> |
parameters |
private static java.io.File |
PWD |
private Transformation |
transformation |
Modifier | Constructor and Description |
---|---|
private |
Transform(Input.Builder input,
Input.Builder stylesheet) |
|
Transform(org.xml.sax.InputSource input,
java.io.File stylesheet)
Create a transformation using InputSource input XML and
stylesheet in a File
|
|
Transform(org.xml.sax.InputSource input,
org.xml.sax.InputSource stylesheet)
Create a transformation using InputSource input XML and
InputSource stylesheet
|
|
Transform(org.w3c.dom.Node sourceNode)
Create a transformation that allows us to serialize a DOM Node
|
|
Transform(org.w3c.dom.Node sourceNode,
java.io.File stylesheet)
Create a transformation from an input Node and stylesheet in a File
|
|
Transform(org.w3c.dom.Node sourceNode,
java.lang.String stylesheet)
Create a transformation from an input Node and stylesheet in a String
|
|
Transform(javax.xml.transform.Source inputSource,
javax.xml.transform.Source stylesheetSource)
Create a transformation using Source input XML and Source stylesheet
|
|
Transform(java.lang.String input,
java.io.File stylesheet)
Create a transformation using String input XML and stylesheet in a File
|
|
Transform(java.lang.String input,
java.lang.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
|
private java.lang.String |
getDefaultSystemId() |
java.lang.Object |
getParameter(java.lang.String name)
See a parameter used for the transformation
|
org.w3c.dom.Document |
getResultDocument()
Perform the XSLT transformation specified in the constructor
|
java.lang.String |
getResultString()
Perform the XSLT transformation specified in the constructor
|
private void |
provideSystemIdIfRequired(javax.xml.transform.Source source)
Ensure that the source has a systemId
|
void |
setErrorListener(javax.xml.transform.ErrorListener errorListener)
Set the ErrorListener for the transformation
|
void |
setOutputProperties(java.util.Properties outputProperties)
Override output properties specified in the transformation stylesheet
|
void |
setOutputProperty(java.lang.String name,
java.lang.String value)
Override an output property specified in the transformation stylesheet
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Add a parameter for the transformation
|
void |
setURIResolver(javax.xml.transform.URIResolver uriResolver)
Set the URIResolver for the transformation
|
protected void |
transformTo(javax.xml.transform.Result result)
Perform the actual transformation
|
(package private) static <R> R |
withExceptionHandling(Transform.Trans<R> trans) |
private static final java.io.File PWD
private final Transformation transformation
private final java.util.Map<java.lang.String,java.lang.Object> parameters
public Transform(java.lang.String input, java.lang.String stylesheet)
input
- stylesheet
- public Transform(java.lang.String input, java.io.File stylesheet)
input
- stylesheet
- public Transform(org.xml.sax.InputSource input, org.xml.sax.InputSource stylesheet)
input
- stylesheet
- public Transform(org.xml.sax.InputSource input, java.io.File stylesheet)
input
- stylesheet
- public Transform(org.w3c.dom.Node sourceNode)
sourceNode
- public Transform(org.w3c.dom.Node sourceNode, java.lang.String stylesheet)
sourceNode
- stylesheet
- public Transform(org.w3c.dom.Node sourceNode, java.io.File stylesheet)
sourceNode
- stylesheet
- private Transform(Input.Builder input, Input.Builder stylesheet)
public Transform(javax.xml.transform.Source inputSource, javax.xml.transform.Source stylesheetSource)
inputSource
- stylesheetSource
- private void provideSystemIdIfRequired(javax.xml.transform.Source source)
source
- private java.lang.String getDefaultSystemId()
protected void transformTo(javax.xml.transform.Result result) throws javax.xml.transform.TransformerException
result
- javax.xml.transform.TransformerException
public java.lang.String getResultString() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public org.w3c.dom.Document getResultDocument() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public void setOutputProperty(java.lang.String name, java.lang.String value)
name
- value
- public void setOutputProperties(java.util.Properties outputProperties)
outputProperties
- Transformer.setOutputProperties(java.util.Properties)
public void setParameter(java.lang.String name, java.lang.Object value)
name
- value
- Transformer.setParameter(java.lang.String, java.lang.Object)
public java.lang.Object getParameter(java.lang.String name)
name
- Transformer.getParameter(java.lang.String)
public void clearParameters()
Transformer.clearParameters()
public void setURIResolver(javax.xml.transform.URIResolver uriResolver)
Transformer.setURIResolver(javax.xml.transform.URIResolver)
public void setErrorListener(javax.xml.transform.ErrorListener errorListener)
Transformer.setErrorListener(javax.xml.transform.ErrorListener)
static <R> R withExceptionHandling(Transform.Trans<R> trans) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException