Hi all,

Would someone be kind enough to assist me on what I originally thought was a simple problem? I'm attempting to do a transformation in C# using a transform like the following snippet but I get an error along the lines of "Cannot find a script or an extension object associated with namespace:http://whatever". The functions I'm defining are in the xsl from which they will be called. To simplify, i've omitted all code between <!--etc. etc. etc. --> and inserted a single example of a call to removeDecimal.

Does anyone know of a workaround for this?

Much thanks in advance

<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://thirdpartyproprietary/IDOCS" exclude-result-prefixes="ns0 jsks" xmlns:jsks="http://whatever"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xslutput method="xml" encoding="ISO-8859-1" indent="yes"/>
<xslaram name="datasourceName"/>
<xslaram name="timestamp"/>
<xsl:template match="/">
<message>
<header>
<message_number>3304</message_number>
<message_type>OrderSpek</message_type>
<destination>XYZ</destination>
<timestamp>
<xsl:value-of select="$timestamp"/>
</timestamp>
</header>

<!--etc. etc. etc. -->
<xsl:value-of select="jsks:removeDecimal(ns0:/FOLD1/FOLD2/FIELDS[CHAR__TYPE='YZ']/../CHILDREN/YYYYY/item/FIELDS/PG)"/>

<!--etc., etc. etc -->

<!--THE FUNCTIONS-->
<xsl:function name="jsks:removeDecimal">
<!--REMOVE DECIMAL IF PRESENT -->
<xslaram name="number"/>
<xsl:choose>
<xsl:when test="contains($number,'.')">
<xsl:value-of select="substring-before($number,'.')"/>
</xsl:when>
<xsltherwise>
<xsl:value-of select="$number"/>
</xsltherwise>
</xsl:choose>
</xsl:function>
</xsl:stylesheet>