|Re: JET2 custom XPath function [message #1008666 is a reply to message #1008554]
||Wed, 13 February 2013 14:15
| Paul Elder
Registered: July 2009
Here is what I think is happening:|
You declared your function in a plug-in other than your JET transformation. (This is what the FAQ suggests.) Then you run the JET transformation (which is a project in your workspace). In this case, JET will fail to find your custom function. The reason:
* JET does some fancy manipulation of your environment to temporarily load the JET project as a plug-in. But, JET does not load any other workspace projects, so at run time, JET cannot find your function. (This was be design - resolving plug-ins correctly is a hard problem. What JET does is a 'hack' to allow quick testing.)
There are several ways to work around this:
1) Instead of launching the JET transformation from your development environment, use the Run menu to start an Eclipse Application instance. The default configuration of this 'inner' Eclipse instance will include your JET transformation along with any other plug-ins in your workspace. Once this second Eclipse instance is running, create a project with your test data, and create a launch configuration to run it through your JET transformation.
2) Define the function in your JET project.
a) Start by making the Java packages visible in that project: Drop down the Package Explorer 'view menu' (this little white downward pointing triangle), and choose Filters. Then, clear the 'Java elements from JET Transformation projects' check box and click OK.
b) Open plugin.xml in the JET project, and add the function declaration.
c) Create the function implementation in a Java package in your project.
Powered by FUDForum
. Page generated in 0.01561 seconds