Subject: Re: [xsl] Re: PHP integration with XSLT From: Alessio Mazzieri <mazzieri@xxxxxxxxxxx> Date: Fri, 09 Nov 2001 10:54:15 +0100 |
access from a php script the xml file (including the xslt stylesheet declaration to transform it) thru an http fopen():Thanks for all, but I want a simply method to: 1) request an XML file; 2) transforming it with the related XSL document (server side by Cocoon) that produce a valid PHP file; 3) make it processed from Apache to execute the PHP script.
$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");
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: PHP integration with XSLT, dfour | Thread | [xsl] Building/transforming XML on , Doug Howell |
Re: [xsl] Change an XSLT top-level , David Carlisle | Date | Re: [xsl] Variable in XPath..., Alessio Mazzieri |
Month |