*/
public Driver() {
_stream = null;
- _treeBuilder = new FOTreeBuilder();
- _treeBuilder.setUserAgent(getUserAgent());
- setupDefaultMappings();
}
public Driver(InputSource source, OutputStream stream) {
_stream = stream;
}
+ public void initialize() {
+ _stream = null;
+ _treeBuilder = new FOTreeBuilder();
+ _treeBuilder.setUserAgent(getUserAgent());
+ setupDefaultMappings();
+ }
+
public void setUserAgent(FOUserAgent agent) {
userAgent = agent;
}
private FOUserAgent getUserAgent() {
if(userAgent == null) {
userAgent = new FOUserAgent();
- userAgent.setLogger(log);
+ userAgent.setLogger(getLogger());
+ String base = org.apache.fop.configuration.Configuration.getStringValue("baseDir");
+ userAgent.setBaseURL(base);
}
return userAgent;
}