Location of extension classes
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 42
- Joined: Sun Jul 15, 2012 12:26 pm
- Location: London
Location of extension classes
Hello,
Can you tell me where I put a .jar file containing a class I want to use within an XSLT transformation? I simply can't get this to work I have tried every conceivable logical location. I'm using XML Developer v14 Ent Ed on Debian (x64).
Within my stylesheet declaration I'm using :
But when I try to run the transformation I'm told that a matching methods cannot be found.
--
William
Can you tell me where I put a .jar file containing a class I want to use within an XSLT transformation? I simply can't get this to work I have tried every conceivable logical location. I'm using XML Developer v14 Ent Ed on Debian (x64).
Within my stylesheet declaration I'm using :
Code: Select all
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:src="xalan://src.functions.BlockCalculator"
--
William
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Location of extension classes
Hello,
It doesn't matter where the .jar library is located, what's important is to configure the transformation scenario and add it there as an extension.
Edit the scenario: Document > Transformation > Configure Transformation Scenario (there's a corresponding action in the toolbar), Edit. In the XSLT section press the Extensions button and add the .jar library there.
Regards,
Adrian
It doesn't matter where the .jar library is located, what's important is to configure the transformation scenario and add it there as an extension.
Edit the scenario: Document > Transformation > Configure Transformation Scenario (there's a corresponding action in the toolbar), Edit. In the XSLT section press the Extensions button and add the .jar library there.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 42
- Joined: Sun Jul 15, 2012 12:26 pm
- Location: London
Re: Location of extension classes
Thanks for that Adrian, I've made some progress however, when I apply this transformation I now get :adrian wrote:Hello,
It doesn't matter where the .jar library is located, what's important is to configure the transformation scenario and add it there as an extension.
Edit the scenario: Document > Transformation > Configure Transformation Scenario (there's a corresponding action in the toolbar), Edit. In the XSLT section press the Extensions button and add the .jar library there.
Regards,
Adrian
Description: src/functions/BlockCalculator : Unsupported major.minor version 51.0
The jar file in question was built using JDK1.7.0_03 on the same machine as I'm running this.
Any thoughts on this?
--
William
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Location of extension classes
Hi,
By default Oxygen uses Java SE 6 (1.6). If you compile the Java classes with JDK 1.7, you will have to compile them with 1.6 compatibility.
e.g. or if you use an ant script use the javac task like this:
Regards,
Adrian
By default Oxygen uses Java SE 6 (1.6). If you compile the Java classes with JDK 1.7, you will have to compile them with 1.6 compatibility.
e.g.
Code: Select all
javac -source 1.6 -target 1.6
Code: Select all
<javac source="1.6" target="1.6">
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 42
- Joined: Sun Jul 15, 2012 12:26 pm
- Location: London
Re: Location of extension classes
Hello again Adrian, I can't do this as we use 1.7 specific code is there a way I can change the JRE used by oXygen?adrian wrote:Hi,
By default Oxygen uses Java SE 6 (1.6). If you compile the Java classes with JDK 1.7, you will have to compile them with 1.6 compatibility.
e.g.or if you use an ant script use the javac task like this:Code: Select all
javac -source 1.6 -target 1.6
Regards,Code: Select all
<javac source="1.6" target="1.6">
Adrian
--
William
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Location of extension classes
Hello,
You could bypass the Java VM bundled with Oxygen and use the one installed on your system or simply replace it. The bundled Java VM is located in the 'jre' folder from the Oxygen installation folder. Either rename that and Oxygen will try to pick Java from the JAVA_HOME or PATH environment variables, or replace it with your own.
You can check the Java VM version in Oxygen in: Help > About, System properties, "java.runtime.version"
Regards,
Adrian
You could bypass the Java VM bundled with Oxygen and use the one installed on your system or simply replace it. The bundled Java VM is located in the 'jre' folder from the Oxygen installation folder. Either rename that and Oxygen will try to pick Java from the JAVA_HOME or PATH environment variables, or replace it with your own.
You can check the Java VM version in Oxygen in: Help > About, System properties, "java.runtime.version"
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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