public class IdentityTransformer
extends javax.xml.transform.Transformer
| Constructor and Description |
|---|
IdentityTransformer()
Creates a new IdentityTransformer
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearParameters()
Clear all parameters set with setParameter.
|
javax.xml.transform.ErrorListener |
getErrorListener()
Get the error event handler in effect for the transformation.
|
java.util.Properties |
getOutputProperties()
Get a copy of the output properties for the transformation.
|
java.lang.String |
getOutputProperty(java.lang.String name)
Javadoc included from JAXP 1.1 Transfomer:
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the parameter with the given name, that was previously set
with the setParameter or setParameters methods.
|
static ResultHandler |
getResultHandler(javax.xml.transform.Result result)
Returns an Adaptx ResultHandler for the given JAXP Result
|
javax.xml.transform.URIResolver |
getURIResolver()
Returns the URIResolver that will used during processing for
resolving URIs.
|
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error event listener in effect for the transformation.
|
void |
setOutputProperties(java.util.Properties properties)
Set the output properties for the transformation.
|
void |
setOutputProperty(java.lang.String name,
java.lang.String value)
Javadoc included from JAXP 1.1 Transfomer:
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Adds the given parameter (name/value binding) for the
transformation.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that will be used to resolve URIs encountered
during processing.
|
void |
transform(javax.xml.transform.Source xmlSource,
javax.xml.transform.Result outputTarget)
Process the given source tree to the output result.
|
public IdentityTransformer()
public void clearParameters()
clearParameters in class javax.xml.transform.Transformerpublic javax.xml.transform.ErrorListener getErrorListener()
getErrorListener in class javax.xml.transform.Transformerpublic java.lang.Object getParameter(java.lang.String name)
Javadoc included from JAXP 1.1 Transfomer:
This method does not return a default parameter value, which cannot be determined until the node context is evaluated during the transformation process.
getParameter in class javax.xml.transform.Transformerpublic javax.xml.transform.URIResolver getURIResolver()
getURIResolver in class javax.xml.transform.Transformerpublic static final ResultHandler getResultHandler(javax.xml.transform.Result result) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException - if the given Result is not supported, or
if any exceptions occur while attempting to create a ResultHandler.public void setErrorListener(javax.xml.transform.ErrorListener listener)
throws java.lang.IllegalArgumentException
setErrorListener in class javax.xml.transform.Transformerlistener - The new error listener.java.lang.IllegalArgumentException - if listener is null.public void setParameter(java.lang.String name,
java.lang.Object value)
Javadoc included from JAXP 1.1 Transfomer:
Pass a qualified name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.
For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.
setParameter in class javax.xml.transform.Transformername - The name of the parameter, which may begin with a namespace URI
in curly braces ({}).value - The value object. This can be any valid Java object. It is
up to the processor to provide the proper object coersion or to simply
pass the object on for use in an extension.public void setURIResolver(javax.xml.transform.URIResolver resolver)
setURIResolver in class javax.xml.transform.Transformerresolver - An object that implements the URIResolver interface,
or null.public void transform(javax.xml.transform.Source xmlSource,
javax.xml.transform.Result outputTarget)
throws javax.xml.transform.TransformerException
transform in class javax.xml.transform.TransformerxmlSource - The input for the source tree.outputTarget - The output target.javax.xml.transform.TransformerException - If an unrecoverable error occurs
during the course of the transformation.public void setOutputProperties(java.util.Properties properties)
throws java.lang.IllegalArgumentException
Javadoc included from JAXP 1.1 Transfomer:
If argument to this function is null, any properties previously set are removed.
Pass a qualified property key name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.
For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.
If a given property is not supported, it will be silently ignored.
setOutputProperties in class javax.xml.transform.Transformerproperties - A set of output properties that will be
used to override any of the same properties in effect
for the transformation.java.lang.IllegalArgumentException - if any of the argument keys are not
recognized and are not namespace qualified.OutputKeys,
Propertiespublic java.util.Properties getOutputProperties()
Javadoc included from JAXP 1.1 Transfomer:
The properties should contain a set of layered properties. The first "layer" will contain the properties that were set with setOutputProperties and setOutputProperty. Subsequent layers contain the properties set in the stylesheet and the default properties for the transformation type. There is no guarantee on how the layers are ordered after the first layer. Thus, getOutputProperties().getProperty(String key) will obtain any property in effect for the stylesheet, while getOutputProperties().get(String key) will only retrieve properties that were explicitly set with setOutputProperties and setOutputProperty.
Note that mutation of the Properties object returned will not effect the properties that the transformation contains.
getOutputProperties in class javax.xml.transform.TransformerOutputKeys,
Propertiespublic void setOutputProperty(java.lang.String name,
java.lang.String value)
throws java.lang.IllegalArgumentException
Javadoc included from JAXP 1.1 Transfomer:
Set an output property that will be in effect for the transformation.Pass a qualified property name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.
For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the TrAX name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.
setOutputProperty in class javax.xml.transform.Transformername - A non-null String that specifies an output
property name, which may be namespace qualified.value - The non-null string value of the output property.java.lang.IllegalArgumentException - If the property is not supported, and is
not qualified with a namespace.OutputKeyspublic java.lang.String getOutputProperty(java.lang.String name)
throws java.lang.IllegalArgumentException
Javadoc included from JAXP 1.1 Transfomer:
Get an output property that is in effect for the transformation. The property specified may be a property that was set with setOutputProperty, or it may be a property specified in the stylesheet.getOutputProperty in class javax.xml.transform.Transformername - A non-null String that specifies an output
property name, which may be namespace qualified.java.lang.IllegalArgumentException - If the property is not supported.OutputKeys