org.exist.xslt
Class TransformerFactoryAllocator

java.lang.Object
  extended by org.exist.xslt.TransformerFactoryAllocator

public class TransformerFactoryAllocator
extends Object

Allows the TransformerFactory that is used for XSLT to be chosen through configuration settings in conf.xml Within eXist this class should be used instead of directly calling SAXTransformerFactory.newInstance() directly

Author:
Adam Retter , Andrzej Taramina

Field Summary
static String CONFIGURATION_ELEMENT_NAME
           
static String CONFIGURATION_TRANSFORMER_ATTRIBUTE_ELEMENT_NAME
           
static String PROPERTY_CACHING_ATTRIBUTE
           
static String PROPERTY_TRANSFORMER_ATTRIBUTES
           
static String PROPERTY_TRANSFORMER_CLASS
           
static String TRANSFORMER_CACHING_ATTRIBUTE
           
static String TRANSFORMER_CLASS_ATTRIBUTE
           
 
Method Summary
static SAXTransformerFactory getTransformerFactory(BrokerPool pool)
          Get the TransformerFactory defined in conf.xml If the class can't be found or the given class doesn't implement the required interface, the default factory is returned.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_ELEMENT_NAME

public static final String CONFIGURATION_ELEMENT_NAME
See Also:
Constant Field Values

TRANSFORMER_CLASS_ATTRIBUTE

public static final String TRANSFORMER_CLASS_ATTRIBUTE
See Also:
Constant Field Values

PROPERTY_TRANSFORMER_CLASS

public static final String PROPERTY_TRANSFORMER_CLASS
See Also:
Constant Field Values

CONFIGURATION_TRANSFORMER_ATTRIBUTE_ELEMENT_NAME

public static final String CONFIGURATION_TRANSFORMER_ATTRIBUTE_ELEMENT_NAME
See Also:
Constant Field Values

PROPERTY_TRANSFORMER_ATTRIBUTES

public static final String PROPERTY_TRANSFORMER_ATTRIBUTES
See Also:
Constant Field Values

TRANSFORMER_CACHING_ATTRIBUTE

public static final String TRANSFORMER_CACHING_ATTRIBUTE
See Also:
Constant Field Values

PROPERTY_CACHING_ATTRIBUTE

public static final String PROPERTY_CACHING_ATTRIBUTE
See Also:
Constant Field Values
Method Detail

getTransformerFactory

public static SAXTransformerFactory getTransformerFactory(BrokerPool pool)
Get the TransformerFactory defined in conf.xml If the class can't be found or the given class doesn't implement the required interface, the default factory is returned.

Parameters:
pool - A database broker pool, used for reading the conf.xml configuration
Returns:
A SAXTransformerFactory, for which newInstance() can then be called Typical usage: Instead of SAXTransformerFactory.newInstance() use TransformerFactoryAllocator.getTransformerFactory(broker).newInstance()


Copyright (C) Wolfgang Meier. All rights reserved.