Den 16/02/11 13.48, David FOXWELL skrev:
Hi,

I've just read an article that shows how to clean up php code using xsl. The script would simply generate xml instead of html which would be left to the xsl processor. As someone who is only a debutant in php but not bad in xsl, this looks like a great idea. I don't see why it would not be a great idea even for an expert in php. The article is already 10 years old, so I wondered if there are any disadvantages to this way of doing things as I have not read of such a technique before.
Time has shown that you cannot rely on the XSL/T processor in the browser (things may be better now though), so you have to do the XML->HTML conversion step in the server. This step can be more or less expensive and also takes time, and web sites with high loads may not want to do that.

Also note that most XSL/T processors cannot work in streaming mode where the output is being generated _while_ the XML is still being read causing a delay until the whole input has been read.

I am not saying that XSL/T is not a viable technology. It is perfect for generating data and converting it to HTML or fixed length text-files (ok, only semi-perfect for that), but that it has a somewhat invisible cost.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.