PHP CAN do XML + XSL = HTML stuff !

From: Date: Sat, 18 Mar 2000 06:56:14 +0000
Subject: PHP CAN do XML + XSL = HTML stuff !
Groups: php.version4 
Request: Send a blank email to php-version4+get-12352@lists.php.net to get a copy of this message
Hi there, My previous post electrified lots of brains out here. I'm glad the discussion was so fruitfull. For those practical types on the list, I've come up with a list of solutions (tested) to do the job: For those of you who don't remeber wat was it all about (this thread was even mentioned in an article @ xmlhack) : for every page-request (the user requests, say, index.xml) the xml file was taken, then xsl stylesheet, which transformed xml to html (or rather xhtml) was applied to it and the resulting data were output to the client's browser. Here are the ways in which I've managed to pull this out: 1) Java: My setup was: Apache 1.3.12, PHP4b4pl1 + Zend Optimizer 0.95 running on Win98, Tomcat (a jakarta servlet server project). PHP script sent xml filename to a servlet, which then took care of all transformations and sent output back to PHP script, which after small transformations (like calculating right image sizes in <img... tags) put that output to client's browser. It was rather speedy (requests took circa a little less than100ms) with load of about 300 requests per minute. The XML file was 50k big, XSL file - 60k. 2) bactick-method: My setup was: Apache 1.3.12, PHP4b4pl1 + Zend Optimizer 0.95 running on Win98, Infoteria's iXSLT command-line XSL processor (which took as input XML and XSL file. Rest as above. It wasn't unfortunatelly as speedy as the previous one. It took about 0,5 - 1 sec. per request. Other solutions include mod_php as request handler for .xml files (there are some libraries at CPAN taking care of XSL transformations). By binding it directly into Apache we achieve a kind of transparency - cool. As my colleague reported - requests are being handled at less than 50ms. So there's no big difference to serving regular html files.... One thing I appreciate the most is the fact that I have a SINGLE XSL STYLESHEET for my whole site (and believe me - pages differ :-). Cheers [ : : ] Lukasz Felsztukier : : I T D e p a r t m e n t : : d i g i t a l O n e : : interactive media agency : : h t t p : / / w w w . d i g i t a l o n e . p l : : Al. Kosciuszki 1, Lodz : : tel./fax [0 42] 632.89.74

« previous php.version4 (#12352) next »