How strange that my current favourite isn't mentioned yet:
AwesomeTemplateEngine
(I'd love to try HarryF's SimpleT, but I don't do pear.)
| SitePoint Sponsor |

How strange that my current favourite isn't mentioned yet:
AwesomeTemplateEngine
(I'd love to try HarryF's SimpleT, but I don't do pear.)
We (InterAKT) have succeded to overcome all limitations about DOMXML and DOMXSL, and thus have a very powerful XML/XSL platform for content publishing in a MVC way.Originally Posted by tezza
We had a very painfull journey indeed, with literally hundreds of hours spent to research how the problems in PHP should be surpassed. We've had extensive chats with Christian Stoker but finally we've managed to get something stable out.
http://www.interakt.ro/products/Krysalis/
Alexandru
It seems that you've skipped our open source XML/XSL CMS - Komplete Lite.
It is built upon Krysalis (and it's open source).
Komplete Lite was designed for Krysalis and I can also say that Krysalis advanced a lot because of Komplete requirements.
We have tried to make Komplete a very adaptive CMS, that allows us to use most of the nice Krysalis features - I think all of them
- it uses taglibs everywhere for code completion
- it's pages are designed as aggregated pipelines with cache support for performance and for site section independence
- it is based completely on the separation of application logic from the presentation layer - so changing the presentation layer can be made with a simple click
- it already includes a very powerful structure manager
- has various page types (to be rendered in the central site section) and can easily include new page types
- it can import RSS streams from other sites
- has support for various types of nuggets (not as many as nuke, but we are welcoming contributions)
- includes a visual HTML editor (KTML lite)
- and many other features.
Komplete can be found at http://www.interakt.ro/products/KompleteLite/index.php
Alexandru
74. PHPMarker
I hope i'm not too lateit is just another template engine that uses HTML templates with some XML special tags to iterate over scalar, hash and object lists, perform text transformations... nothing new, it is just a personal project
Last edited by viTxo; Sep 20, 2003 at 03:42. Reason: project url changed





Coming back to this for a minute; Tezza have you used PHPs Sablotron extension ?By contrast, XSLT fully (and I *do* mean 100%) separates the job of producing the content from the job of arranging the output (in our case, usually HTML markup). XSLT Designers can easily create their own widgets using templates (named or otherwise). Furthermore, they can continue to use those widgets on their .NET or their JSF (Java Server Faces) applications.
I have in the past and it works though it's suggested that there is a lag using this extension ?
![]()
TPLN project http://tpln.sourceforge.net
Wait, your list is not yet completed. I've got a hat to toss into the pile:
PGenie! A template engine written entirely in PHP. It's the simplest engine ever. No new language to learn.
http://www.pgenie.org/
-- Dante

'tis very easy indeed :)Originally Posted by dlorenso
2 questions
1) why do your txml files needs to have the prefix "txml_" since there is going to be no other kinds of tags? If there are other kinds, see question2.
2) Why use "txml_" prefix instead of using namespaces? If you had namespaces, both the txml files and the template files may be included as part of a larger processing pipeline. You txml_ tags could still co-exist happily because they abide by the namespace standard.
instead of...
havePHP Code:<txml_template src="/templates/public.html/>
<txml_title>This is my test title</txml_title>
<txml_php_header><?php
$myvar = "Test Variable";
?></txml_php_header>
<txml_body>
This is the body of my page. Look, it contains some PHP:
<?php echo $myvar; ?>
</txml_body>
your template now looks likePHP Code:<?xml version="1.0" ?>
<txml xmlns="http://www.pgenie.org/" src="/templates/public.html/">
<title>This is my test title</title>
<php_header><?php
$myvar = "Test Variable";
?></php_header>
<body>
This is the body of my page. Look, it contains some PHP:
<?php echo $myvar; ?>
</body>
</txml>
PHP Code:<?xml version="1.0" ?>
<txml xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://www.pgenie.org/">
<t:php_header/>
<html>
<head>
<title><t:title/></title>
</head>
<body>
<t:body/>
</body>
</html>
</txml>
Last edited by tezza; Oct 1, 2003 at 19:50.



This thread since page 2 has been a most fascinating read!
I'm a novice in 90% of the concepts spoken by most of you, such as Tezza, but I'm very attuned to adapting more complex standards and expanding my horizons.
Specifically, I'm talking about OO programming (especially getting aquatinted with all this complex programmer jargon), template systems, and XML. I have yet to do serious experimentation in all of these, but I'm keen on learning.
I've been coding in basics of PHP for the past 2.5 years, but since reading this thread, and similar at Sitepoint, I've been provoked to go further.
I have experience with OO in C++, after taking a class, but that was some years ago. What I care for isn't C++, but abstraction and what not applied in PHP and similar web languages. I care for web development.
Anyway, I'm apt to soon start my progress in XML, and investigating this XSLT. I'll have to check out those two sites posted by Tezza (http://www.zvon.org and http://www.w3schools.com).
I have some general questions, on topic to template systems.
There is such an obvious abundance, but the 7 criteria's posted by Jasonlotito poses as a strong dividing factor from good to bad for most of these template systems (such as, perhaps, those posted in this thread).
So, what is a PHP template system that efficiently sympathizes with each of those rules?
I'm currently in search of one. I was thinking of implementing the template system expressed in this site point article:
http://www.sitepoint.com/article/1218/1
But, I'm interested on the input from the experts here.
I have great curiosity for XSLT as well, but I haven't coded in XML before (although I know I could adapt quickly), and I don't have much time right now to learn XSLT being I'm in a bit of hurry to put a certain website of mine up.
My last question is about WYSIWYG editors for HTML and what-not, such as the popular DreamWeaver.
For most of you, you expressed DW and other WYSIWYG editors (like Homesite) as perchance a tool you use very often. But, I'm obviously missing something. Why is it that DW is popular among advance coders? I have always thought experts in coding prefer to do their work via a text editor, such as TextPad (my personal favorite). Undoubtably all of you are capable of it. DW I have always seen as a "novice" tool, yet it's #1 as a compliancy factor in Jasonlotito's list.
I haven't used DW since 3 years ago, but since then I'm assuming it has transformed in features that appeal greatly to regular text-editor coders. I'll never use a WYSIWYG editor, but I'm just interested in knowing why it has such popularity amongst the advance programmers.![]()
Ah! Well, you see, your first statement was the answer to your first question! :-) Namespaces tend to confuse people. I do like your suggestion, though and have though about it. My intent was to keep the definitions in the TXML files the same format as the replacement tags inside the template file.Originally Posted by tezza
By prefixing the tag name with 'txml_' it was a way to acheive the namespace advantages withough having to explain to people what a namespace was. To keep the spirit of PGenie intact, I must reduce the complexity to nil. It's just old school "mail-merge" and nothing more. You make it too XML-ish and people will just opt to use XML proper.
-- Dante
Hmm... actually, if I used namespaces, do you think there is a canned tool that would parse my TXML files and TXML templates and do the merge in real time faster and more efficiently than the PHP classes in PGenie that I've got working now?Originally Posted by tezza
I wouldn't mind using some XML libraries to do my work for me if... a) it's simple to get those libraries working, b) the performance of PGenie improves greatly, and c) the complexity of PGenie code is reduced tremendously.
In otherwords, I'm looking for volunteers to make PGenie even better.
--Dante



Hmm, if one could give me some feedback on this question, I'd greatly appreciate it.There is such an obvious abundance, but the 7 criteria's posted by Jasonlotito poses as a strong dividing factor from good to bad for most of these template systems (such as, perhaps, those posted in this thread).
So, what is a PHP template system that efficiently sympathizes with each of those rules?![]()

I imagine that most of the people referring to DW in this thread are speaking of it in the context of the end-user of their templates - ie. the "novice".Originally Posted by Solace D.
I doubt they use it much for building the dynamic bits themselves. They may use it for the design of their templates.
My usage of DW is restricted to using it's JavaScript sourcecode as a kind of cookbook when I forget how to do some "behaviour" in JavaScript. Even for that, I haven't used it in years. I've had the MX2004 version sitting here for a while now but not had the time/motivation to install it. I suppose I should out of professional curiousity. Maybe it has a new, really good, PHP editor
I tend to use php-eclipse as an editor when I'm not using homesite.
as soon as php-ecplise fixes the "tabbing bug", I'll stop using homesite. Homesite's mass-search/replace is also better than Eclipse's.
http://phpeclipse.sourceforge.net/
I've got a couple:
XT
Very similar to Zope's template attribute language (TAL), but with many additions inspired by XSL, Cold Fusion, and others.
Example:
SimpleTemplateCode:<h2 xt:content="table/title">Fake Title</h2> <table> <tr xt:loop="row table/rows"> <td xt:content="row/index">1</td> <td xt:content="row/value">Some Value</td> </tr> </table>
A faster and simpler (aka. no XML strictness) but still very featureful template syntax. For example:
Both are available as part of the Sitellite CMS framework.Code:<h2>{table/title}</h2> <table> {loop table/rows} <tr> <td>{loop/_index}</td> <td>{loop/_value}</td> </tr> {end loop} </table>





There is a thought... Not seen DW MX2004 yet as I do not actually think there is much change bar some stuff to do with a pages CSS for one ?Maybe it has a new, really good, PHP editor
But DW does need a decent PHP editor though![]()
Hi everyone,
I'm new here, what a great site for a php enthusiast. And what a great topic to start off with.
I've been programming and experimenting with php after hours. What a great language. I started off by writing db driven websites but had no idea of code/layout seperation, just loads of php-tags and echo statements in the html code. While that works fine (and is probably fastest too) I have been on the lookout for something more generic. Some people recommended using templates. I looked at a few but decided to pass. There's just so many of them, which one to choose ? Also, those template engines often carry way more functionality than I need.
That's when I started experimenting with XML/XSL using Sablotron. Tezza, I've read all your posts and I share your opinion 100%. Yes : the learning curve for XSLT is high. It's easy enough to output something but it gets complicated very fast. I've had many headaches and sleepless nights over the simplest of problems. Yes : the way of thinking is different. But I learn about problems as I stumble upon them. I'm not an XSLT expert, I just look for answers when something does not work.
I takes a lot more time to learn about XSLT processing then it does to learn a template engine but ... XML and XSLT are based on rules and those rules are standards. I'm in IT during my day job but no PHP in sight there. Yet, what I have learned about XML/XSLT I can use in any other language that has a W3C compliant XSLT parser.
To me, that advantage alone is worth taking the steeper learning curve. I also use the OO capabilities that PHP 4.X has. It may not be true OO but it still gets the job done, keeps the code readable and very easy to maintain.
I can't wait to see what PHP5 has to offer in terms of XML/XSL.





LikewiseI can't wait to see what PHP5 has to offer in terms of XML/XSL.I'm actually hoping PHP5 is more compliant and stable as far as using the DOM for XSL-T ?
Like yourself, I've used in the past Sablotron though I'm leaning more towards the DOM now myself, would recommend that you do the same as Sablotron has expired so to speak...
If you every do find a half decent non too bloated Template Engine, PM me would you ?
Cheers![]()

Hey there Spencer, nice to know I'm not alone in my views on templating.
cheers.
PS. Why not give the alpha version of XAO a go.
It's 100% OO, 100% XML/XSLT
Anyway, if you get time, I'd appreciate some feedback/criticisms.
It's supposed to be accessible for PHP newbies.
http://xao-php.sf.net
Tezza, i'd like to very much and i have bookmarked your site. I've got some customer work to get out of the way first.
I'll come back to that Tezza and Dr Livingston ... both of you mention DOMXML. Is that another library to has to be compiled ? Is there a website to download it? ?
Tezza, i see XAO required PHP 4.3.3. My host is at 4.2.3. Blocking issue ?
And to combine both questions, is 4.3.3 required to work with DOMXML ?
I prefer fast template, it's the first, fast, simple and effective, just how I like it![]()





Spencer; DOMXML comes pre-installed as of PHP4.2.x I believe ? I didn't need to download anything, all I had to do was move the DLL from the c:/php/extensions folder to my own extensions folder, then uncomment the extension found in the php.ini file yes ?
But as I found out yersterday, DOMXML doesn't come with XSL-T by default and I've yet to get the limxslt.dll to work
Try Harry's site for some examples on using this extension, for the most part it does a good job of replicating the W3C standard
Good Luck btw![]()

It will probably work fine. It's just that I am developing it with 4.3.3 and have not had time to install older versions of the PHP distro to test it. Different versions of the DOMXML extension will be shipped with different versions of PHP on occasions when the extension is upgraded.Originally Posted by Spencer
It should work on 4.2.x actually -- if you try it and it break, let me know what breaks and I will see how serious it is. I was planning on doing some regression testing at the beta stage.
I believe Dr Livingston has answered your other queries![]()





Tezza - I use this version for a while now and I'll gladly test your libraries for you if you can provide an example to work from ?My host is at 4.2.3
If you've got a minute or two, email me a ZIP to
nukebaghdad@yahoo.co.uk
And I'll get back to you tomorrow yes ?![]()

Thanks dudeOriginally Posted by Dr Livingston
zip file is here
http://sourceforge.net/project/showf...group_id=88235
It includes functional tutorials which themselves use the library. If the tutorials work, then everything should be OK.
There are three basic tutorials. I plan on putting a great deal of effort into producing more.
You can see the tutorials in action on my server at home.
http://terencekearns.com/tutorials/
(it is 56k modem on static IP. excessive port scanning traffic has reduced transfer rates to average 1.5kb/sec). If you get a proxy error from Apache, it means my windows box has died![]()
Bookmarks