xslt or php for rendering output
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.
精彩评论