I recently begun work on a view renderer that could utilize XSL/T as a template option for Yii. The longterm goal is to provide a clean way for XML output, so we can easily produce RSS, Atom, XSL:FO, XUL and whatnot without having to rely on third-party libraries. I’ve just checked a very early version of it in at github and would like to get some feedback. I’ve equipped the blog demo with a simple RSS feed as a proof-of-concept.
Please be advised: This is very far from production use!!!
Simple templates are ok and you can do a number of tricks with exslt. The biggest problems remain object serialization (right now, the code will be trapped in an infinite loop if you’ve got circular relations in your database) and access to the Yii::app()->* method set. The first problem is a matter of optimization, the second one poses a real problem. I’m afraid I’ve hit a limitation of XSLTProcessor::registerPHPFunctions(). If somebody knows a solution other than writing a wrapper just for this, please tell me. Right now, a call like this in XSL:
<xsl:value-of select="php:function('Yii::app()->getHomeUrl')" />
Will result in this: