RemexHtml/Tokenizer/Tokenizer.php
public function setFragmentContext( $namespace, $tagName ) {
		$this->fragmentNamespace = $namespace;
		$this->fragmentName = $tagName;

		if ( strval( $namespace ) !== '' && $namespace !== HTMLData::NS_HTML ) {
			return;
		}

		switch ( $tagName ) {
		case 'title':
		case 'textarea':
			$this->state = self::STATE_RCDATA;
			break;

		case 'style':
		case 'xmp':
		case 'iframe':
		case 'noembed':
		case 'noframes':
			$this->state = self::STATE_RAWTEXT;
			break;

		case 'script':
			$this->state = self::STATE_SCRIPT_DATA;
			break;

		case 'noscript':
			if ( $this->scriptingFlag ) {
				$this->state = self::STATE_RAWTEXT;
			}
			break;

		case 'plaintext':
			$this->state = self::STATE_PLAINTEXT;
			break;
		}
	}
public function setFragmentContext( $namespace, $tagName ) {
		$this->fragmentNamespace = $namespace;
		$this->fragmentName = $tagName;

		if ( strval( $namespace ) !== '' && $namespace !== HTMLData::NS_HTML ) {
			return;
		}

		switch ( $tagName ) {
		case 'title':
		case 'textarea':
			$this->state = self::STATE_RCDATA;
			break;

		case 'style':
		case 'xmp':
		case 'iframe':
		case 'noembed':
		case 'noframes':
			$this->state = self::STATE_RAWTEXT;
			break;

		case 'script':
			$this->state = self::STATE_SCRIPT_DATA;
			break;

		case 'noscript':
			if ( $this->scriptingFlag ) {
				$this->state = self::STATE_RAWTEXT;
			}
			break;

		case 'plaintext':
			$this->state = self::STATE_PLAINTEXT;
			break;
		}
	}
public function setFragmentContext ( $ namespace , $ tagName ) { $ this -> fragmentNamespace = $ namespace ; $ this -> fragmentName = $ tagName ; if ( strval ( $ namespace ) !== '' && $ namespace !== HTMLData :: NS_HTML ) { return ; } switch ( $ tagName ) { case 'title' : case 'textarea' : $ this -> state = self :: STATE_RCDATA ; break ; case 'style' : case 'xmp' : case 'iframe' : case 'noembed' : case 'noframes' : $ this -> state = self :: STATE_RAWTEXT ; break ; case 'script' : $ this -> state = self :: STATE_SCRIPT_DATA ; break ; case 'noscript' : if ( $ this -> scriptingFlag ) { $ this -> state = self :: STATE_RAWTEXT ; } break ; case 'plaintext' : $ this -> state = self :: STATE_PLAINTEXT ; break ; } }
Initialize the tokenizer for fragment parsing

@param string $namespace The namespace of the context element
@param string $tagName The name of the context element
Initialize the tokenizer for fragment parsing