Reputation: 1
I have two files student.xml & sytle_student.xsl and one file PHP whaich contain form that search for data in the xml file but the result dosen't appear in the style attached in the xsl file i used this function
$xslDoc = new DOMDocument();
$xslDoc->load("style_student.xsl");
$xmlDoc = new DOMDocument();
$xmlDoc->load("student.xml");
$proc = new XSLProcessor();
$proc->importStylesheet($xslDoc);
echo $proc->transformToXML($xmlDoc);
but it generate 2 errors in this line
$proc = new XSLProcessor();
The error : Class 'XSLProcessor' not found in C:\wamp\www\index.php on line 51
how can i handle this error to display ya result with the xsl style ??
Upvotes: 0
Views: 223
Reputation: 19502
The class is called XSLTProcessor
, the extension is ext/xsl
.
Check if the extension ext/xsl is loaded.
var_dump(extension_loaded('xsl'));
If not install the extension and/or change the php.ini to activate it.
Upvotes: 3