"Terence" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
<<warning: very personal opinion to follow...>> If you *do* finally decide to master XSLT, you have to conclude that *any* other templating system is a complete/utter waste of time. (all authors of ``yet another PHP templating system'', please try not to be offended). I'm not talking about features/functionality either (for which XSLT is more than adequate), I'm talking about sheer bothersomeness. ie. I'm fundamentally lazy and I couldn't be bothered learning "snazzy g.o.a.t. [proprietary] templaty goodness system" -- "crappy" or otherwise -- I don't care how fantastic it is. The reason why the PHP template has been re-invented so many times, is becuase there is something missing - IMHO, XSLT fits that gap more than "good enough". And since it is a standard, it will only get better -- it has a future. And that, my friends, it good enough for me (being that I am lazy and all).
Well, I completely agree with you that there is no "one size fits all" solution for templates, and that one should choose what suites him best.
Anyway, in similar "very personal" way, especially since I am naturaly biased, I will like to point out my reasons why I prefere my php template system compared to the xml+xslt combination:
a) xslt templates are "fat" or "dirty" ones if you will, meaning they contain code, effectively nullifying my major reason to use templates: separation of html from code. Some people prefer "fat" templetes and try to stuff whole presentation logic in them while only models reside in php, but prefer "thin" or "clean" templates, where template is basically resource produced independently by designer, and php runs presentation and model code. With fat templates, they usualy get to complex to be coded by web designers, so they have to be poked by programmers, which means that it is much more difficult to split the job. Also means that programmer has to code in 2 languages, php, and in some template language, while in thin templates model he can code in one language domain. b) working with xml+xslt requires more footwork than with TT.
Well, again, it is just my reasons. Other people may have other needs and preferences.
well I have to say I can't disagree with any of your reasons.
One of the major dangers of XSLT is how easy it is to end up with a mess. In it's defence, I will say that it is also possible to program cleanly with XSLT and avoid the "code" aspects such as flow-control that you speak of. I'm still learning how to program XSLT cleanly in real-world situations. It can be done though.
Like PHP, XSLT has a lot of depth. I've maintained (and produced myself) some pretty horrid code - but that doesn't stop me from chosing PHP as a weapon in my arsenal.
I guess one of my main gripes about templating systems is that I can't re-use them between applications. Because there are so many different ones to chose from, almost every pre-built, open-source, PHP app that I download uses a different one. For me, this reason is good enough to pick the "standard" one and encourage others to do the same.
With XSLT, I can develop HTML widgets and "include" them in different contexts in different applications -- provided those apps support the standard.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

