java.lang.ObjectAn instance of this abstract class can transform a source tree into a result tree.javax.xml.transform.Transformer
An instance of this class can be obtained with the TransformerFactory.newTransformer method. This instance may then be used to process XML from a variety of sources and write the transformation output to a variety of sinks.
An object of this class may not be used in multiple threads running concurrently. Different Transformers may be used concurrently by different threads.
A Transformer
may be used multiple times. Parameters and
output properties are preserved across transformations.
- href="Jeff.Suttor@Sun.com">Jeff Suttor
$
- Revision: 570103 $, $Date: 2007-08-27 09:24:55 -0400 (Mon, 27 Aug 2007) $Constructor: |
---|
|
Method from javax.xml.transform.Transformer Summary: |
---|
clearParameters, getErrorListener, getOutputProperties, getOutputProperty, getParameter, getURIResolver, reset, setErrorListener, setOutputProperties, setOutputProperty, setParameter, setURIResolver, transform |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.xml.transform.Transformer Detail: |
---|
|
|
Get a copy of the output properties for the transformation. The properties returned should contain properties set by the user, and properties set by the stylesheet, and these properties are "defaulted" by default properties specified by section 16 of the XSL Transformations (XSLT) W3C Recommendation. The properties that were specifically set by the user or the stylesheet should be in the base Properties list, while the XSLT default properties that were not specifically set should be the default Properties list. Thus, getOutputProperties().getProperty(String key) will obtain any property in that was set by #setOutputProperty , #setOutputProperties , in the stylesheet, or the default properties, while getOutputProperties().get(String key) will only retrieve properties that were explicitly set by #setOutputProperty , #setOutputProperties , or in the stylesheet. Note that mutation of the Properties object returned will not effect the properties that the transformer contains. If any of the argument keys are not recognized and are not namespace qualified, the property will be ignored and not returned. In other words the behaviour is not orthogonal with setOutputProperties . |
|
This method does not return a default parameter value, which cannot be determined until the node context is evaluated during the transformation process. |
|
Reset this
The reset |
|
If argument to this function is null, any properties previously set are removed, and the value will revert to the value defined in the templates object. 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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used. AnIllegalArgumentException is thrown if any of the
argument keys are not recognized and are not namespace qualified. |
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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used. The Properties object that was passed to #setOutputProperties won't be effected by calling this method. |
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 qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used. |
If the resolver argument is null, the URIResolver value will be cleared and the transformer will no longer have a resolver. |
Transform the XML An empty |