= 5) { $data = new DOMDocument; $data->load('./doc/'.$todo); $xsl = new DOMDocument; $xsl->load('./doc.xslt'); $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); if(!($ret=$proc->transformToXML($data))) die("XSLT error"); echo $ret; } else { $xslt = xslt_create(); if(!($ret=xslt_process($xslt,'./doc/'.$todo, './doc.xslt'))) die("XSLT error:" . xslt_error($xslt)); echo $ret; xslt_free($xslt); } ?>