I've been trying to implement dynamic evaluation of an expression using Exslt extension dyn:evaluate($expression) in XSLT1.0, but I'm getting the below error.
BW-XML-100006 Job-261000 Error in [Transform_MCIN_XML/Dyn.process/Transform XML]
The [net.sf.saxon.trans.XPathException] occurred during XSLT transformation:
net.sf.saxon.trans.XPathException:
Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate()
caused by: ; SystemID: tibcr://; Line#: 6; Column#: -1
net.sf.saxon.trans.XPathException:
Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate()
I'm able to do the same using saxon:evaluate($expr) in Saxon-B XSLT 2.0 engine. However I need to do this in XSLT 1.0.
How to resolve this error and implement the same in XSLT 1.0 in Tibco BW?
Any suggestions would be highly appreciated.
Thank you.
Sample XSLT:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dyn="http://exslt.org/dynamic"
extension-element-prefixes="dyn">
<xsl:variable name="expr" select="not(1=1)"/>
<xsl:template match="/">
<eval>
<xsl:value-of select="dyn:evaluate($expr)"/>
</eval>
</xsl:template>
</xsl:stylesheet>
net.sf.saxon.trans
clearly indicates you use some version of Saxon 8 or 9 that should support XSLT 2.0 and Saxon specific extensions. – Martin Honnenxs:dateTime
value you can checkfoo castable as xs:dateTime
. That tries to parse according to the W3C schemaxs:dateTime
syntaxyyyy-mm-ddThh:mm:ss
plus optional time zone information, see w3.org/TR/xmlschema-2/#dateTime for details. For other formats you would need to write a regular expression and/or extract components and check them respectively try to construct adateTime
. – Martin Honnen