Re: [PHP4BETA] Can PHP do XML + XSL = HTML stuff ?
| From: | Manuel Lemos | Date: | Mon, 13 Mar 2000 06:52:07 +0000 |
| Subject: | Re: [PHP4BETA] Can PHP do XML + XSL = HTML stuff ? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12031@lists.php.net to get a copy of this message | ||
Hello Lukasz,
On 13-Mar-00 05:11:26, you wrote:
>> Maybe PHP feature XSL support with some C library and the parsing /
>> transformation overhead will be minimized, but right now I don't see any
>> good reason for not outputing your database information formatted within
>> HTML instead of going all the way over XML/XSL->HTML.
>It's not about that - it's about separating content from presentation.
>Imagine having a single XSL stylesheet applying to your whole site...
That's a very honourable intention because it promotes maintainability, but
there are ways that much more direct that going through XML/XSL, often
called generically of templates. There are several template engines for PHP.
Andrei Zmievski is designing built-in template engine for PHP 4, but if you
don't want to wait for it to be ready you may use popular PHP template engines
like FastTemplate from http://www.thewebmasters.net/ .
Jesus Castagneto even implemented a cache engine for FastTemplate that
minimizes the overhead of parsing and processing templates on every access
of pages that don't change that frequently.
http://phpclasses.UpperDesign.com/browse.html/package/23
>> If you are just trying this as academic project or on some server where the
>> load is not important, it seems ok. I am not preaching you, I am just
>> trying to tell you that the overhead and the CPU load of run-time parsing
>> is not neglectable.
>Sorry for the "preaching" part - I was tired of bouncing from site to site
>only to find out I can use Java, Java or Java (and a bit of Perl or Python)
>and got angry there wasn't any php-based solution to this. But Andy gave me
>new hope - but hey, Manuel - maybe you're up to porting some perl or c stuff
>concerning XSL in PHP? I'd be glad to hear : "YES" :-) Cheers, Lukasz
Last time I looked at XSL I didn't like it much. It looked very cryptic
because it was made up of searching and replacing rules than something more
objective and easier to manage than simple templates.
Templates are basically HTML files with insertion marks that the template
engine look for and insert code that is need. This makes templates more
appropriate for having them be edited by designers, not programmers. The
truth is that usually designers are not good programmers and programmers
are not good designers. XSL seems to be a programmers only thing.
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--