Altova XMLSpy, testing custom functions in xsl transformations

In our middleware solutions (Oracle SOA Suite) we use a lot of xsl transformations.
Part of these transformations use database backend systems to do lookups for transforming internal values to external values (which can then be communicated to the customers).

In the Oracle SOA Suite you can create custom xsl function and store the jar in the domain/lib folder and then you will be able to use it in the xsl transformations.

We use Altova XMLSpy a lot for creating all these xsl transformations. To be able to test these custom functions in the xsl transformations you use the next in the xsl files to be able to execute the custom functions from within XMLSpy.

Simple example of how to call a java method to uppercase a string.
[code language=”java”]
package nl.xenta.xsl;

public class Helper {
public Helper() {
}

public static String formatName(String input) {
return input.toUpperCase();
}
}
[/code]

And the xsl transformation calling the formatName method
[code language=”xml”]









[/code]

Use “java:” to add the jar file to the xsl.

Now we can test the xsl transformation without deploying the bpel with the transformation first and test it on runtime.

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Comments are closed.