title: XSLT Javascript extension can not call Date().toISOString()
body: <p>I have been experimenting with using extensions in <strong>Microsoft XSLT</strong> (1.0). In the JavaScript function I am just trying to return the current ISO date and time. Sounds easy enough.</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                             xmlns:ms="urn:schemas-microsoft-com:xslt"
                             xmlns:util="urn:Utility" extension-element-prefixes="ms"
                              &gt;
      &lt;xsl:output method="html" version="1.0"/&gt;
      &lt;ms:script language="javascript" implements-prefix="util"&gt;
      function today()
      {
          var d = new Date();
          return d.toISOString();
      }
      &lt;/ms:script&gt;
      &lt;!-- =============================================================== --&gt;
      &lt;xsl:template match="Person"&gt;
         &lt;xsl:value-of select="util:today()"/&gt;
      &lt;/xsl:template&gt;
      &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>When you execute the above it returns "Function expected". According to the Microsoft documentation <code>toISOString</code> is supposed for the JavaScript <code>Date()</code> object. If I use <code>toGMTString()</code> it returns the GMT value. I really need the current date returned in ISO format.</p>
  
  <p>Any ideas?</p>