function get_quality_test_result($registry_object, $relatedClassStr, $output_mode = 'xml')
 {
     $xslt_processor = Transforms::get_qa_transformer();
     $dom = new DOMDocument();
     $dom->loadXML(str_replace('&', '&', $registry_object->getRif()), LIBXML_NOENT);
     $xslt_processor->setParameter('', 'dataSource', $registry_object->data_source_id);
     $xslt_processor->setParameter('', 'output', $output_mode);
     $xslt_processor->setParameter('', 'relatedObjectClassesStr', $relatedClassStr);
     // XXX: TODO!!!
     return $xslt_processor->transformToXML($dom);
 }
Esempio n. 2
0
 function transformForQA($xml, $data_source_key = null)
 {
     try {
         $xslt_processor = Transforms::get_qa_transformer();
         $dom = new DOMDocument();
         $dom->loadXML(str_replace('&', '&', $xml), LIBXML_NOENT);
         $xslt_processor->setParameter('', 'dataSource', $data_source_key ?: $this->ro->data_source_key);
         $xslt_processor->setParameter('', 'relatedObjectClassesStr', $this->ro->getRelatedClassesString());
         return $xslt_processor->transformToXML($dom);
     } catch (Exception $e) {
         echo "UNABLE TO TRANSFORM" . BR;
         echo "<pre>" . nl2br($e->getMessage()) . "</pre>" . BR;
     }
 }