[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: PHP integration with XSLT
Processing with PHP files generated by Cocoon is not very easy. Here is the way I do it : access from a php script the xml file (including the xslt stylesheet declaration to transform it) thru an http fopen(): $fp = fopen("http://yourserverpath/yourfile.xml", "r"); read it : while(!feof($fp)) $content .= fgets($fp, 1024); 1024 is an arbitrary buffer size (NB: you can't use sizeof("yourfile.xml") with a remote access) save it as a php file : $fp = fopen("yourtransformedfile.php", "w"); fwrite($fp); fclose($fp); and load that file : header("Location: http://yourserverpath/yourtransformedfile.php"); It's not simple but it works. Every attempt I made to redirect immediatly after getting the transformed content failed, even with ob_start()... Daniel Fournier XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|