protected function getOutputContext(DOMNode $output)
	{
		$contexts = [
			'boolean(ancestor::attribute)'             => 'attribute',
			'@disable-output-escaping="yes"'           => 'raw',
			'count(ancestor::element[@name="script"])' => 'raw'
		];
		foreach ($contexts as $expr => $context)
		{
			if ($this->evaluate($expr, $output))
			{
				return $context;
			}
		}

		return 'text';
	}
protected function getOutputContext(DOMNode $output)
	{
		$contexts = [
			'boolean(ancestor::attribute)'             => 'attribute',
			'@disable-output-escaping="yes"'           => 'raw',
			'count(ancestor::element[@name="script"])' => 'raw'
		];
		foreach ($contexts as $expr => $context)
		{
			if ($this->evaluate($expr, $output))
			{
				return $context;
			}
		}

		return 'text';
	}
protected function getOutputContext ( DOMNode $ output ) { $ contexts = [ 'boolean(ancestor::attribute)' => 'attribute' , '@disable-output-escaping="yes"' => 'raw' , 'count(ancestor::element[@name="script"])' => 'raw' ] ; foreach ( $ contexts as $ expr => $ context ) { if ( $ this -> evaluate ( $ expr , $ output ) ) { return $ context ; } } return 'text' ; }
Get the context type for given output element

@param  DOMNode $output
@return string
Get the context type for given output element