public function XSLT($filepath, $use_xslcache = true)
    {
        if ($use_xslcache && extension_loaded('xslcache')) {
            $xslt = new XSLTCache;
            $xslt->importStylesheet($filepath);
        } else {
            $xsl = new DOMDocument;
            $xsl->load($filepath);

            $xslt = new XSLTProcessor;
            $xslt->importStylesheet($xsl);
        }

        return $xslt->transformToXML(dom_import_simplexml($this));
    }
public function XSLT($filepath, $use_xslcache = true)
    {
        if ($use_xslcache && extension_loaded('xslcache')) {
            $xslt = new XSLTCache;
            $xslt->importStylesheet($filepath);
        } else {
            $xsl = new DOMDocument;
            $xsl->load($filepath);

            $xslt = new XSLTProcessor;
            $xslt->importStylesheet($xsl);
        }

        return $xslt->transformToXML(dom_import_simplexml($this));
    }
public function XSLT ( $ filepath , $ use_xslcache = true ) { if ( $ use_xslcache && extension_loaded ( 'xslcache' ) ) { $ xslt = new XSLTCache ; $ xslt -> importStylesheet ( $ filepath ) ; } else { $ xsl = new DOMDocument ; $ xsl -> load ( $ filepath ) ; $ xslt = new XSLTProcessor ; $ xslt -> importStylesheet ( $ xsl ) ; } return $ xslt -> transformToXML ( dom_import_simplexml ( $ this ) ) ; }
Transform current node and return the result

Will take advantage of {@link http://pecl.php.net/package/xslcache PECL's xslcache}
if available

@param    string $filepath Path to stylesheet
@param    bool $use_xslcache If TRUE, use the XSL Cache extension if available
@return    string                    Result
Transform current node and return the result