org.exist.xslt
Class TransformerFactoryAllocator
java.lang.Object
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
Method Summary |
static SAXTransformerFactory |
getTransformerFactory(DBBroker broker)
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. |
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
getTransformerFactory
public static SAXTransformerFactory getTransformerFactory(DBBroker broker)
- 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:
broker
- A database broker, 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.