/** * Fetch configuration and check whether XSLT is properly supported. * @return boolean True iff XSLT support is present. */ static function checkSupport() { self::$externalCommand = Config::getVar('cli', 'xslt_command'); self::$externalParameterSnippet = Config::getVar('cli', 'xslt_parameter_option'); // Determine the appropriate XSLT processor for the system if (self::$externalCommand) { // check the external command to check for %xsl and %xml parameter substitution if (strpos(self::$externalCommand, '%xsl') === false) { return false; } if (strpos(self::$externalCommand, '%xml') === false) { return false; } self::$processor = 'External'; } elseif (extension_loaded('xsl') && extension_loaded('dom')) { // XSL/DOM modules present self::$processor = 'PHP'; } else { // no XSLT support return false; } }