Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating Html form takes a long time for larger xsd files #46

Open
mashour06 opened this issue Jul 7, 2021 · 0 comments
Open

Generating Html form takes a long time for larger xsd files #46

mashour06 opened this issue Jul 7, 2021 · 0 comments

Comments

@mashour06
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant