Custom XPath functions provide a great way of handling functionality which cannot be performed using standard set of available functions. Oracle SOA suite comes with many functions which include standard XPath functions as well as SOA and BPEL XPath extension functions. However, many times a situation comes where we wish that so and so function was available.
In such case, arguably custom XPath is the best way to deal with.
For detail, please look at here http://tech-learnings.blogspot.ca/2010/05/using-custom-xpath-functions.html.