define FOP configuration file in framework
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
define FOP configuration file in framework
Post by Ron Van den Branden »
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
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: define FOP configuration file in framework
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:
Usually developers use our Oxygen SDK to compile Java changes:
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
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:
https://xmlgraphics.apache.org/fop/0.95/anttask.html
Regards,
Radu
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
static{
PluginWorkspaceProvider.getPluginWorkspace().setGlobalObjectProperty("fop.configuration.file.path", "/path/to/my/fop.conf.xml");
}
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
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:
https://xmlgraphics.apache.org/fop/0.95/anttask.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service