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>
Use tib:evaluate
instead of dyn:evaluate
.
Depending on what else your BW process contains, you may need to add the namespace below to the process in order to use the tib:evaluate() function:
namespace=http://www.tibco.com/bw/xslt/custom-functions
prefix=tib
To do that you would select the process, click the "namespace registry" button, and add the namespace above.