xsd2html2xml icon indicating copy to clipboard operation
xsd2html2xml copied to clipboard

Generating Html form takes a long time for larger xsd files

Open mashour06 opened this issue 4 years ago • 0 comments

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.

mashour06 avatar Jul 07 '21 21:07 mashour06