protected static function createReplacementNode(DOMDocument $dom, array $replacement)
	{
		if ($replacement[0] === 'expression')
		{
			$newNode = $dom->createElementNS(self::XMLNS_XSL, 'xsl:value-of');
			$newNode->setAttribute('select', $replacement[1]);
		}
		elseif ($replacement[0] === 'passthrough')
		{
			$newNode = $dom->createElementNS(self::XMLNS_XSL, 'xsl:apply-templates');
			if (isset($replacement[1]))
			{
				$newNode->setAttribute('select', $replacement[1]);
			}
		}
		else
		{
			$newNode = $dom->createTextNode($replacement[1]);
		}

		return $newNode;
	}
protected static function createReplacementNode(DOMDocument $dom, array $replacement)
	{
		if ($replacement[0] === 'expression')
		{
			$newNode = $dom->createElementNS(self::XMLNS_XSL, 'xsl:value-of');
			$newNode->setAttribute('select', $replacement[1]);
		}
		elseif ($replacement[0] === 'passthrough')
		{
			$newNode = $dom->createElementNS(self::XMLNS_XSL, 'xsl:apply-templates');
			if (isset($replacement[1]))
			{
				$newNode->setAttribute('select', $replacement[1]);
			}
		}
		else
		{
			$newNode = $dom->createTextNode($replacement[1]);
		}

		return $newNode;
	}
protected static function createReplacementNode ( DOMDocument $ dom , array $ replacement ) { if ( $ replacement [ 0 ] === 'expression' ) { $ newNode = $ dom -> createElementNS ( self :: XMLNS_XSL , 'xsl:value-of' ) ; $ newNode -> setAttribute ( 'select' , $ replacement [ 1 ] ) ; } elseif ( $ replacement [ 0 ] === 'passthrough' ) { $ newNode = $ dom -> createElementNS ( self :: XMLNS_XSL , 'xsl:apply-templates' ) ; if ( isset ( $ replacement [ 1 ] ) ) { $ newNode -> setAttribute ( 'select' , $ replacement [ 1 ] ) ; } } else { $ newNode = $ dom -> createTextNode ( $ replacement [ 1 ] ) ; } return $ newNode ; }
Create a node that implements given replacement strategy

@param  DOMDocument $dom
@param  array       $replacement
@return DOMNode
Create a node that implements given replacement strategy