I have an XSLT stylesheet with the following header
<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">
I have also have custom functions:
<msxsl:script language="JavaScript" implements-prefix="my-ext">
var lineCounter = 0;
var totalPages = 0;
var currentPage = 1;
var currentObject = '';
var colSpan = 0;
function getLineCounter()
{
return lineCounter;
}
function updateLineCounter(aValue)
{
lineCounter += aValue;
return '';
}
My custom functions are used throughout my xsl. When I transform my XML using this XSL from a command line, using msxsl.exe it works perfectly and produces perfect HTML.
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.
Sample errors look like:
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
We can see that functions are not found/understood - although this is the same code I run at command line using msXSL.exe.
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?
Man... I hope this question makes sense! Any help appreciated. Thanks.
Rob
My phpInfo displays
**XSL**
XSL enabled
libxslt Version 1.1.23
libxslt compiled against libxml Version 2.6.32
EXSLT enabled
libexslt Version 0.8.13