title: XSLT Transformation Using msxsl="urn:schemas-microsoft-com:xslt"
body: <p>I have an XSLT stylesheet with the following header</p>
  
  <pre><code>  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:lxslt="http://xml.apache.org/xslt"
      xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
      extension-element-prefixes="redirect"
     xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:my-ext="ext1"&gt;
  </code></pre>
  
  <p>I have also have custom functions:</p>
  
  <pre><code>&lt;msxsl:script language="JavaScript" implements-prefix="my-ext"&gt;
  
      var lineCounter = 0;
      var totalPages = 0;
      var currentPage = 1;
      var currentObject = '';
      var colSpan = 0;
  
      function getLineCounter()
      {
          return lineCounter;
      }
  
      function updateLineCounter(aValue)
      {
          lineCounter += aValue;
           return '';
      }
  </code></pre>
  
  <p>My custom functions are used throughout my xsl.  When I transform my XML using this XSL from a command line, using <strong>msxsl.exe</strong> it works perfectly and produces perfect HTML.</p>
  
  <p>OK, here's my issue: I'm trying to use PHP to perform the transformation on the server and send back results.  I have used this procedure many times before without issue; howver, this is the first time I've tried it with MSXSL extensions and functions.</p>
  
  <p>Sample errors look like:</p>
  
  <pre><code>Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: xmlXPathCompOpEval: **function resetAll not found** in D:\Development\AppServ\www\RJFWEB\jqueryFileTree\PHPMain.php on line 49
  
  Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: **Unregistered function** in D:\Development\AppServ\www\RJFWEB\jqueryFileTree\PHPMain.php on line 49
  </code></pre>
  
  <p>We can see that functions are not found/understood - although this is the same code I run at command line using <strong>msXSL.exe.</strong></p>
  
  <p>SO, ultimately I'm trying to find out if there's something I need to fix/add in my PHP.ini to understand how to use the MS extensions OR do I need to change the XSL stylesheets?</p>
  
  <p>Man... I hope this question makes sense!  Any help appreciated.
  Thanks.</p>
  
  <p>Rob</p>
  
  <p>My phpInfo displays</p>
  
  <pre><code>**XSL**
  XSL                                      enabled
  libxslt Version                              1.1.23
  libxslt compiled against libxml Version      2.6.32
  EXSLT                                    enabled
  libexslt Version                             0.8.13
  </code></pre>