Oxygen not finding external java functions

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
theultimatehack
Posts: 2

Oxygen not finding external java functions

Wed Mar 13, 2019 8:11 pm

In my XSLT I have the following declaration
xmlns:MyFunction="java:com.somepath.MyFunctions"

In both my Validation Scenario Settings as well as my Debug Scenario Settings, I am using the extensions button(s) to add a library that points to the MyFuncations.class file

This does not seem to work in either the editor validation nor during a debug scenario Saxon-PE 9.6.0.7 engine.

For all method calls Im getting "Cannot find a matching 'x'-argument function named........ where is is the number of parms for the method call.

Any suggestions??
Radu
Posts: 6059

Re: Oxygen not finding external java functions

Thu Mar 14, 2019 12:10 pm

Hi,

There can be various potential problems:

1) The class is not properly packed in the JAR library, for example you may not have included the "com/somepath" folder structure inside which the class resides.
2) The method that you want to call is not defined as static.
3) Somehow the XSLT processor considers that it cannot cast the XSLT parameters to the Java object types specified in your method.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
theultimatehack
Posts: 2

Re: Oxygen not finding external java functions

Thu Mar 14, 2019 6:27 pm

Looks like number 1 was the issues. I repackaged as a .jar and it now works.

Thanks

Return to “Common Problems”

Who is online

Users browsing this forum: Google [Bot] and 0 guests