RE: [PHP4BETA] Can PHP do XML + XSL = HTML stuff ?
| From: | Lucas Wartenburger | Date: | Tue, 14 Mar 2000 18:08:21 +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-12091@lists.php.net to get a copy of this message | ||
> As I have been saying doing XML-XSL processing to serve
> pages at online
> time is a waste of performance, especially when there are much more
> faster and objective methods. [...]
Sure, it wouldn't be a very fast solution, but there are lots of
advantages that many people still don't see:
Imagine, you want to develop a web-interface for a database, which is
used to store specific XML-documents.
Now: how to transform this into HTML (maybe later to PDF, LaTeX,
whatever).
This transformation is the only "intelligent" aspect of your whole
application: It's not very difficult to develop your own XML-format
for your documents, but it's quite useless without transformation.
For the moment, it would be easier and faster to let PHP-code (using
XML and DOM-XML) do this transformation. But then, the "intelligence"
of your application would be in the code - whenever you want to change
the layout (or add a new one), you'll have to edit the code.
Using XSLT, the intelligence would be stored in your XSL-scripts
(that's why it's hard to write them, but it's easier to read and edit
existing ones). This makes it much easier to change the layout of your
whole application without having to touch your PHP-code. In some
cases, this aspect of flexibility is more important than speed (btw:
CPUs are getting cheaper, programmers / designers are getting more
expansive...).
I've started developing such an application 6 months ago, but the
PHP-XSL-integration-part is still missing. So I'm very thankful for
this discussion.
lucas
_________________________________________________________________
email: lucas@wartenburger.de
fax : +49-89-2443-20203 (vlf.net)
pgp1 : 5E19 F0A9 E27B A465 7CF6 B86A 3B0F 10BB F4C1 3490 (DSS/DH)
pgp2 : E946 C625 8A87 CBEE EAD9 FDF1 59B0 5EFF (RSA)