XSLTProcessor issues w/php 5
Posted: Fri Dec 15, 2006 11:08 am
Hello all,
Hello all,
I'm using php 5 to try and transform xml. I call a function such as;
...which references
The problem is that there is no output. I've tried other methods of the XSLTProcessor to output xhtml, all of which I can't get to work. All I really want to do is create and save an xhtml file from my xml. I've checked my apache (2.2) error log and I'm not getting any errors on the function. Has anyone had success outputting xhtml files with XSLTProcessor? Thanks!
Hello all,
I'm using php 5 to try and transform xml. I call a function such as;
Code: Select all
transformXML('xmldoc.xml','xslstylesheet.xsl');...which references
Code: Select all
function transformXML($filename,$stylesheet) {
$xml = new DOMDocument;
$xml->load($filename);
$xsl = new DOMdocument;
$xsl->load($stylesheet);
$xslt = new XSLTProcessor;
$xslt->importStylesheet($xsl);
$results = $xslt->transformToURI($xml,'file:///temp/test.html');
echo $results;
}//end function transformXMLThe problem is that there is no output. I've tried other methods of the XSLTProcessor to output xhtml, all of which I can't get to work. All I really want to do is create and save an xhtml file from my xml. I've checked my apache (2.2) error log and I'm not getting any errors on the function. Has anyone had success outputting xhtml files with XSLTProcessor? Thanks!