-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hello,
When I generate an Html form from a small xsd file, It doesn’t take a long time, but when I work with a file more than 2 or 3 MB, the process takes a long period of time. I tried with a 2.6 MB file, and after 24 hours the process didn’t finish. Also I get a lot of warnings while processing. For example:
Warning: XSLTProcessor::importStylesheet(): compilation error: file file:/C:/xampp/htdocs/test1/vendor/xsd2html2xml.xsl line 6 element stylesheet in C:\xampp\htdocs\test1\test1.php on line 13
Warning: XSLTProcessor::importStylesheet(): xsl:version: only 1.1 features are supported in C:\xampp\htdocs\test1\test1.php on line 13
this is the php file (test1.php):
$processor = new XsltProcessor;
$xsl = new DOMDocument;
$xsl->load("vendor/xsd2html2xml.xsl");
$processor->importStyleSheet($xsl);
$xml = new DomDocument;
$xml->load('xsd/' . $filename1);
$result = $processor->transformToXml($xml);
// write the form to file
file_put_contents( 'html/' . $filename2, $result );
I tried suppressing the warnings using:
error_reporting(E_ERROR | E_PARSE);
but still, the process takes a long period of time.
Any suggestions to solve the problem would be greatly appreciated. Thanks in advance.