define FOP configuration file in framework
Posted: Mon Mar 30, 2015 3:48 pm
Hi,
I've been developing an XSL-FO transformation scenario in an Oxygen project, for which I have defined a dedicated configuration file in the project-specific "FO Processor Settings" http://www.oxygenxml.com/doc/ug-editor/ ... ssors.html.
Eventually, this project will have to be transformed to an Oxygen framework, and I'm looking for a way to specify a FOP configuration file at the framework level. As far as I can see, it's not possible to just copy the project's
setting to a framework file.
I've looked elsewhere in the forum (see http://www.oxygenxml.com/forum/topic10867.html), where it was suggested that it isn't possible to add global options to Document Type definitions in a framework, and that instead:
But this is not working:
Where and how should the setGlobalObjectProperty be set?
Best,
Ron
I've been developing an XSL-FO transformation scenario in an Oxygen project, for which I have defined a dedicated configuration file in the project-specific "FO Processor Settings" http://www.oxygenxml.com/doc/ug-editor/ ... ssors.html.
Eventually, this project will have to be transformed to an Oxygen framework, and I'm looking for a way to specify a FOP configuration file at the framework level. As far as I can see, it's not possible to just copy the project's
Code: Select all
<entry>
<String>fop.configuration.file.path</String>
<String>/path/to/my/fop.conf.xml</String>
</entry>
I've looked elsewhere in the forum (see http://www.oxygenxml.com/forum/topic10867.html), where it was suggested that it isn't possible to add global options to Document Type definitions in a framework, and that instead:
Unfortunately, my Java skills are insufficient to manage this; if anyone could help me out, that would be fantastic. This is what I've tried: since the framework is based on the TEI add-on framework, I've tried to set this global option in the TEIP5ExtensionsBundle Java class, by editing it as follows (inspired on what I found at http://www.oxygenxml.com/forum/topic10846.html):A workaround would be to create and pack as an extra add-on a plugin for Oxygen which could use for example the Java API ro.sync.exml.workspace.api.PluginWorkspace.setGlobalObjectProperty(String, Object) to set a system property the first time it is started.
Code: Select all
@API(type=APIType.INTERNAL, src=SourceType.PUBLIC)
public class TEIP5ExtensionsBundle extends TEIExtensionsBundleBase {
PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("fop.configuration.file.path", "/path/to/my/fop.conf.xml");
/* the rest goes here */
}
Code: Select all
[javac] /path/to/TEIP5ExtensionsBundle.java:75:
error: <identifier> expected
[javac] PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("fop.configuration.file.path", fopConf);
[javac] ^
Best,
Ron