In this recipe, we will create a custom XPath function in java that can be used by any composite component in an assign or transform. This enables us to add complex logic into our XPath expressions without making an explicit call to Java. We will use the example of calculating the mean and standard deviation of a set of numbers.
Our XPath function will have a signature, as shown in the following code snippet:
double getStdDev(values as node-set)
It will take the value of each node in the input node set, calculate it, and return the standard deviation.
In JDeveloper create a new Java project. From the ...