Error XalanXPathException when using hours-from-duration xpath function in ibm db2 xslt transformation -
input xml:<test><totalduration>pt1h32m7s</totalduration></test>
input xslt:
<?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:template match="/test"> hours=<xsl:value-of select="fn:hours-from-duration(totalduration)"/> hr </xsl:template> </xsl:stylesheet>
expected output: hours=1 hr
instead getting: [ibm][db2/nt64] sql16280n xslt processor returned following error: "xalanxpathexception: function number 'http://www.w3.org/2005/xpath". sqlstate=225x0
expected output: hours=1 hr
instead getting: [ibm][db2/nt64] sql16280n xslt processor returned following error: "xalanxpathexception: function number 'http://www.w3.org/2005/xpath". sqlstate=225x0
this clear: xslt processor using (xalan) doesn't implement xslt 2.0.
you need feed xslt 2.0 code xslt processor implements xslt 2.0.
Comments
Post a Comment