I'm wondering if we lost custom java function support for XSLT-Stylesheets (available with Xalan in ESB 4.0.3) as Saxon is now the XSLT processor (HE edition) in WSO2 ESB 4.5 ?
Original XSLT, worked with ESB 4.0.3:
I copied the custom DateParser.jar in esb4.5.0/repository/components/dropins
<xsl:stylesheet extension-element-prefixes="transform" version="1.0"
xmlns:transform="xalan://my.extension.DateParser"
...
<xsl:value-of select="transform:sdf('dd.MM.yyyy HH:mm:ss',./timestamp)"/>
This showed up in the error log (shortened):
ERROR XSLTMediator Unable to perform XSLT transformation using :
Caused by: net.sf.saxon.trans.XPathException: Cannot find a matching function named {xalan://my.extension.DateParser}sdf()
Changed XSLT for Saxon, not working with ESB 4.5.0 ###
As Saxon handles custom java functions in a different way as Xalan does, I changed the XSLT-Stylesheet like this
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:transform="java:my.extension.DateParser"
...
<xsl:value-of select="transform:sdf('dd.MM.yyyy HH:mm:ss',./timestamp)"/>
Now this showed up in the error log (shortened):
Caused by: net.sf.saxon.trans.XPathException: Cannot find a matching ... function named {java:my.extendsion.DateParser}sdf(). Note that direct calls to Java methods are not available under Saxon-HE
I'm wondering if there will be no support of "direct calls to Java methods" with standard WSO2 ESB distribution (containing Saxon-HE). As Saxon-Enterprise (paid version) will provide this support.