[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: PHP integration with XSLT

Subject: Re: PHP integration with XSLT
From: dfour <dfour@xxxxxxx>
Date: Fri, 9 Nov 2001 10:25:02 -0500
php xslt ob_start
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.