[thelist] info on templates, XML and TLAs

Rob Whitener rwhitener at DesignOptions.com
Fri Feb 28 10:45:01 CST 2003


I have been following this thread from afar and it has piqued my interest.
The hosting company my organization is currently using doesn't seem to have
any kind of templating functionality installed with PHP (their insatallation
of PERL doesn't even support the CGI module) so I have been having to kind
of roll my own templating.  The system is basic.  Create an HTML document,
put @tags@ like these where I know I will want to insert HTML, then use
preg_replace to find and replace all of the different @tags@ with HTML.
Once this is done the new HTML document is saved with a different name and I
use include to push it to the user.  One glaring problem is the url never
changes.  I guess I could get around this by using a meta-tag with the
include function instead of the newly generated HTML document, but I want
something simpler.  Now for the question:  Should I explore using XML and
XSL to do this templating with PHP, or modify what I have?

Thanks,

Rob

-----Original Message-----
From: Tobyn Baugher [mailto:toby at rsux.com]
Sent: Wednesday, February 26, 2003 4:21 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] info on templates, XML and TLAs


On Wednesday, February 26, 2003 3:40 PM -0500 Emma Jane Hogbin
<emmajane at xtrinsic.com> wrote:

> And XSL Transformations are sexier than PHP and Perl templates, right?
> (That's mostly a /rhetorical/ question.) I personally think it's silly
> to use PHP and Perl templates when there's a
> perfectly good XML template language out there.

I'd have to disagree. While XSL is great, probably the display
technology of the future, etc. it's also basically an entire
programming language. Not only that, but it's a programming language
that doesn't have any sort of close ancestor that lots of people are
likely to know to ease the transition (ie. C/C++ -> Java/C#,
Shell/sed/awk -> Perl).

On the other hand, with something like Smarty or Template Toolkit, a
designer can whip up a page in Dreamweaver or whatever they're familiar
with in the regular old (X)HTML they know, love, and have authoring
tools to help them make, and then just put things like {$text} in where
the content should be.

The point of XML+XSL is to separate the content from the presentation.
For that it does its job very well. The point of using a templating
system is to separate the coding work from the designing work, which is
not something XSL is particularly adept at, at least not yet. I,
personally, think both are quite "sexy" in their own ways :).

Just my thoughts,

Toby

--
Tobyn Baugher <toby at rsux.com>
http://www.rsux.com
aim: dieplzkthxbye  icq: 14281524  efnet: toby
--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list