I have to work with a data base file data.xml and a stylesheet data.xsl for data.xml in docker. I put in a php file named fr.php this:
<?php
$xml = new DOMDocument;
$xml->load('data2.xml');
$xsl = new DOMDocument;
$xsl->load('data2.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl);
echo $proc->transformToXML($xml);?>
After I run the program, the web page for that php file show that: Fatal error: Uncaught Error: Class “XSLTProcessor” not found in /var/www/html/fr.php:11 Stack trace: #0 {main} thrown in /var/www/html/fr.php on line 11
I have enabled in php.in the extension for xsl and the result is same. I’ve looked for answers on stack overflow but they don’t match, I’m working with xml in docker.
Alin Ciornei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.