Example #1
0
 /**
  *@desc Transform XML/XSL documents from the current XMLNuke Context.
  *@return DOMDocument - Return the XHTML result
  */
 public function TransformDocumentNoArgs()
 {
     // Creating FileNames will be used in this functions.
     $cacheName = $this->_context->getXml() . ".html";
     $result = $this->_context->getXSLCacheEngine()->get($cacheName, 7200);
     // Check if file cache already exists
     // If exists read it from there;
     if ($this->_outputResult == OutputData::Xslt && $result !== false) {
         return $result;
     } else {
         // Creating FileNames will be used in this functions.
         $xmlFile = new XMLFilenameProcessor($this->_context->getXml());
         // Transform Document
         $result = $this->TransformDocumentFromDOM($this->getXmlDocument($xmlFile));
         // Save cache file - NOCACHE: Doesn't Save; Otherwise: Allways save
         if (!$this->_context->getNoCache() && $this->_outputResult == OutputData::Xslt) {
             $this->_context->getXSLCacheEngine()->set($cacheName, $result);
         }
         return $result;
     }
 }