I am trying to convert XML to another XML using XSLT 2.0. Below is the code that I am using.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:eof="http://style.rbsfm.com/EnrichODCFeed"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:template match="/">
<xsl:element name="tradeArrivalTime">
<xsl:value-of select="fn:current-date()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
On Testing this XSL using Junit , I am getting below Error
(Location of error unknown)javax.xml.transform.TransformerException: Instance method
call to method current-date requires an Object instance as first argument
On Testing it using Eclipse XSLT complier , I am getting below Exception :
17:56:08,138 ERROR [main] JAXPSAXProcessorInvoker - Cannot find external method
'xpath-functions.currentDate' (must be public).
javax.xml.transform.TransformerConfigurationException: Cannot find external method
'xpath-functions.currentDate' (must be public).
Please suggest . I am not able to figure out the mistake