The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory"
. This property names a concrete subclass of the TransformerFactory
abstract class. If the property is not defined, a platform default is be used.
TransformerFactory
class is NOT guaranteed to be thread safe. It is up to the user application to make sure about the use of the TransformerFactory
from more than one thread. Alternatively the application can have one instance of the TransformerFactory
per thread. An application can use the same instance of the factory to obtain one or more instances of a Transformer
or Templates
provided the instance of the factory isn't being used in more than one thread at a time.
TransformerFactory
is a service which creates {@link Transformer}s on demand. The created transformers form the middle part of the rewriter pipeline. The factories itself are not chained but the resulting transformers are. On each pipeline call new instances are created. The factory is referenced using a service property named 'pipeline.type'. Each factory should have a unique value for this property. With the optional property 'pipeline.mode' set to the value 'global' the transformer is used for each and every pipeline regardless of the actual configuration for this pipeline. All available global transformers with a service ranking below zero are chained right after the generator. All available global transformers with a service ranking higher or equal to zero are chained right before the serializer. Therefore the property "service.ranking" should be used for the factory in combination with 'pipeline.mode'. To be compatible with possible future uses of the 'pipeline.mode' property, it should only be used with the value 'global'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|