Пример #1
0
 public function transform($xslt_file)
 {
     $xslt = new domdocument();
     $xml = new domdocument();
     if (file_exists($xslt_file) == false) {
         return false;
     } else {
         if ($xslt->load($xslt_file) == false) {
             return false;
         }
     }
     if ($xml->loadxml($this->document) == false) {
         return false;
     }
     $processor = new xsltprocessor();
     $processor->importstylesheet($xslt);
     foreach ($this->xslt_parameters as $key => $value) {
         $processor->setparameter("", $key, $value);
     }
     return $processor->transformtoxml($xml);
 }