Re: [PHP4BETA] Can PHP do XML + XSL = HTML stuff ?

From: Date: Mon, 13 Mar 2000 05:35:33 +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-12022@lists.php.net to get a copy of this message
Hello Lukasz, On 13-Mar-00 00:26:01, you wrote: >> >No - you take XML file, XSL stylesheets, grab some data from a database >> >(updated often - no need to cache, all files are relatively small and >> >there is few of them - no overloading) and produce HTML. How can I do this >> >? It's rather important to me :-) Cheers, Lukasz >> >[cut] >> Anyway, I still see little point in transforming data from database into >> XML to have it transformed into HTML, instead of transforming the data in >> the database to HTML directly like any PHP database application does. >You *don't* transform ANY data from database into XML. I'll lay it out >nicely: >1) XML file: ><some_tag>some_data_in_it</some_tag> ><stuff_from_database></stuff_from_database> (notice it's empty) >2) some XSL file defining how the XML data are going to look like >3) I grab data off the database >4) I put'em into the previously left-empty tag, <stuff_from_database> >5) I do the transformation using parser >6) I get HTML, do some more magic on it >7) I finally display this to client >That's what I want to achieve. While replying to this, please don't bother >with the "resonablity" aspect of it - I need technical info, not a preach :-) I gave you all the information you need to achieve that. It doesn't seem there is known PHP only solution. Right, now it seems you are closer to achive that with a Java or a COM object (if you are under Windows) that does the XSL transformations you need. 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. 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. 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 --

« previous php.version4 (#12022) next »