Eclipse has a quite nice XQuery mapper, but it lacks an XSLT mapper.
Since JDeveloper has a nice XSL Mapper tool, I incorporated a JDeveloper project in my OEPE OSB project.
Soon I found that the xpath2.0 functions of JDeveloper/SOASuite don't work under OSB. And I could not find how to use the XQuery functions in my Xslt, that do the same.
But I found a nice trick, mainly based on this forum post and this one. I adapted those examples a little, because of the wrong date formats and to get them working in my case.
First declare the following namspaces.
When examining those, it appears that "http://www.oracle.com/XSL/Transform/java/" tells the xsl-processor where to find java classes. And after that the path (package + class) to the actual java class can be appended.
These prefixes should not get into the resulting xml, so you can add them to the exclude list:
1 | exclude-result-prefixes="... date sdf"> |
1 2 | < xsl:variable name = "currentDate" >< xsl:value-of select = "sdf:format(sdf:new("yyyy-MM-dd"),date:new())" ></ xsl:value-of ></ xsl:variable > < xsl:variable name = "currentTime" >< xsl:value-of select = "sdf:format(sdf:new("hh:mm:ss"),date:new())" ></ xsl:value-of ></ xsl:variable > |