import org.apache.fop.layoutmgr.LayoutManagerMaker;
import org.apache.fop.render.RendererFactory;
import org.apache.fop.render.XMLHandlerRegistry;
+import org.apache.fop.util.ContentHandlerFactoryRegistry;
import org.xml.sax.SAXException;
/**
/** The registry for ElementMapping instances */
private ElementMappingRegistry elementMappingRegistry;
+
+ /** The registry for ContentHandlerFactory instance */
+ private ContentHandlerFactoryRegistry contentHandlerFactoryRegistry
+ = new ContentHandlerFactoryRegistry();
/** user configuration */
private Configuration userConfig = null;
return this.elementMappingRegistry;
}
+ /** @return the content handler factory registry */
+ public ContentHandlerFactoryRegistry getContentHandlerFactoryRegistry() {
+ return this.contentHandlerFactoryRegistry;
+ }
+
/**
* Add the element mapping with the given class name.
* @param elementMapping the class name representing the element mapping.
handled = false;
}
} else {
- ContentHandlerFactory factory
- = ContentHandlerFactoryRegistry.getInstance().getFactory(uri);
+ ContentHandlerFactoryRegistry registry
+ = userAgent.getFactory().getContentHandlerFactoryRegistry();
+ ContentHandlerFactory factory = registry.getFactory(uri);
if (factory != null) {
delegate = factory.createContentHandler();
delegateStack.push(qName);
/** the logger */
private static Log log = LogFactory.getLog(ContentHandlerFactoryRegistry.class);
- private static ContentHandlerFactoryRegistry instance;
-
/** Map from namespace URIs to ContentHandlerFactories */
private Map factories = new java.util.HashMap();
- /**
- * @return a singleton instance of the ContentHandlerFactoryRegistry.
- */
- public static ContentHandlerFactoryRegistry getInstance() {
- if (instance == null) {
- instance = new ContentHandlerFactoryRegistry();
- }
- return instance;
- }
-
/**
* Default constructor.
*/