Reset this Transformer
to its original configuration.
Transformer
is reset to the same state as when it was created with {@link javax.xml.transform.TransformerFactory#newTransformer()}, {@link javax.xml.transform.TransformerFactory#newTransformer(javax.xml.transform.Source source)} or{@link javax.xml.transform.Templates#newTransformer()}. reset()
is designed to allow the reuse of existing Transformer
s thus saving resources associated with the creation of new Transformer
s.
The above is from the JAXP specification. With Saxon, it's unlikely that reusing a Transformer will give any performance benefits over creating a new one. The one case where it might be beneficial is to reuse the document pool (the set of documents that have been loaded using the doc() or document() functions). Therefore, this method does not clear the document pool. If you want to clear the document pool, call the method {@link #clearDocumentPool} as well.
The reset Transformer
is not guaranteed to have the same {@link javax.xml.transform.URIResolver}or {@link javax.xml.transform.ErrorListener} Object
s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal URIResolver
and ErrorListener
.
|
|