开发者

xslt or php for rendering output

开发者 https://www.devze.com 2022-12-27 07:00 出处:网络
I\'m creating something where users can upload an xml and data get\'s imported to the database. Now I\'m building some kind of a preview page where users will get to see how their input will look onc

I'm creating something where users can upload an xml and data get's imported to the database.

Now I'm building some kind of a preview page where users will get to see how their input will look once it's stored.

What would be the fastest (in execution time), using XSL to transform the xml to a html page, or using php to render the output?

My guess is XSL is far more suitable (+ faster) for this (and by using a DTD there's no need for cod开发者_如何学Goe written validation, right?)


XSLT is slow; often your PHP script will be faster. That does of course depend on your XSLT scripts, but rendering i.e. Docbook via XSLT vs. PHP's own PhD renderer is 24 hours vs. 1 hour for the PHP manual.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号