title: How to place a java-script function to be applied on an xsl output?
body: <p>I have the following XML node:</p>
  
  <pre><code>&lt;CARRIERNAME&gt;
      &lt;![CDATA[AT&amp;T]]&gt;
  &lt;/CARRIERNAME&gt;
  </code></pre>
  
  <p>I need to place a JavaScript function to be applied on the output which is in this case:"AT&amp;T" to format it.</p>
  
  <p>Here is my approach:</p>
  
  <pre><code>&lt;xsl:value-of select="user:Format_escapeEmbeddedCommas(string(CARRIERNAME))"/&gt;
  </code></pre>
  
  <p>And also I have :</p>
  
  <pre><code>&lt;msxsl:script language="JScript" implements-prefix="user"&gt;
      function Format_escapeEmbeddedCommas(colValue) {
          var strValue = colValue;
          strValue = strValue.replace('&amp;amp;','&amp;');
          return strValue;
      }
  &lt;/msxsl:script&gt;
  </code></pre>
  
  <p>I tried to run it on <a href="http://xslt.online-toolz.com/tools/xslt-transformation.php" rel="nofollow">http://xslt.online-toolz.com/tools/xslt-transformation.php</a>, but it is returning the following error:</p>
  
  <blockquote>
    <p>Error:XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]:
    XPath evaluation returned no result.</p>
  </blockquote>
  
  <p>To see the whole script,please check <a href="http://jsfiddle.net/Abadi/7t1bauao/" rel="nofollow">this Fiddle</a>.
  I would appreciate your help.</p>