I have my custom Java function which performs something and I need to put it to XSL so it could perform something on selected nodes. I was using like this:
<msxsl:script implements-prefix="user" language="java">
<![CDATA[
public String doSomething(String input) {
// does something
return result;
}
]]></msxsl:script>
declaring namespaces:
... xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:user="example.com">
and call:
<xsl:variable name="var">
<xsl:value-of select="user:doSomething(node)"/>
</xsl:variable>
this resulted in "Could not compile stylesheet" error.
Also tried to replace java code with Javascript, error was same.
Do you know how to do this right or other methods how I can insert Java code into XSL and call it?