protected static function loadAsXML($template)
	{
		$xml = '<?xml version="1.0" encoding="utf-8" ?><xsl:template xmlns:xsl="' . self::XMLNS_XSL . '">' . $template . '</xsl:template>';

		$useErrors = libxml_use_internal_errors(true);
		$dom       = new DOMDocument;
		$success   = $dom->loadXML($xml, LIBXML_NOCDATA | LIBXML_NSCLEAN);
		self::removeInvalidAttributes($dom);
		libxml_use_internal_errors($useErrors);

		return ($success) ? $dom : false;
	}
protected static function loadAsXML($template)
	{
		$xml = '<?xml version="1.0" encoding="utf-8" ?><xsl:template xmlns:xsl="' . self::XMLNS_XSL . '">' . $template . '</xsl:template>';

		$useErrors = libxml_use_internal_errors(true);
		$dom       = new DOMDocument;
		$success   = $dom->loadXML($xml, LIBXML_NOCDATA | LIBXML_NSCLEAN);
		self::removeInvalidAttributes($dom);
		libxml_use_internal_errors($useErrors);

		return ($success) ? $dom : false;
	}
protected static function loadAsXML ( $ template ) { $ xml = '<?xml version="1.0" encoding="utf-8" ?><xsl:template xmlns:xsl="' . self :: XMLNS_XSL . '">' . $ template . '</xsl:template>' ; $ useErrors = libxml_use_internal_errors ( true ) ; $ dom = new DOMDocument ; $ success = $ dom -> loadXML ( $ xml , LIBXML_NOCDATA | LIBXML_NSCLEAN ) ; self :: removeInvalidAttributes ( $ dom ) ; libxml_use_internal_errors ( $ useErrors ) ; return ( $ success ) ? $ dom : false ; }
Load given XSL template in a DOM document

@param  string           $template Original template
@return bool|DOMDocument           DOMDocument on success, FALSE otherwise
Load given XSL template in a DOM document