define FOP configuration file in framework

Post here questions and problems related to oXygen frameworks/document types.
Ron Van den Branden
Posts: 48

define FOP configuration file in framework

Mon Mar 30, 2015 3:48 pm


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"

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


setting to a framework file.

I've looked elsewhere in the forum (see, where it was suggested that it isn't possible to add global options to Document Type definitions in a framework, and that instead:
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.

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

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 */

But this is not working:

Code: Select all

    [javac] /path/to/
error: <identifier> expected
    [javac]     PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("fop.configuration.file.path", fopConf);
    [javac]                                               ^

Where and how should the setGlobalObjectProperty be set?


Posts: 5753

Re: define FOP configuration file in framework

Mon Mar 30, 2015 4:27 pm

Hi Ron,

You cannot just call methods anywhere in a java class.
At least you could surround the call to the global plugin workspace in a static section like:

Code: Select all

   PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("fop.configuration.file.path", "/path/to/my/fop.conf.xml");

Usually developers use our Oxygen SDK to compile Java changes:

Maybe as you are not very familiar with Java you could create instead an ANT script and have a transformation scenario which runs it instead. An ANT build script can take control over how the <fop> task is defined and run:

Radu Coravu
<oXygen/> XML Editor

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 1 guest