protected function foldConstantXPathExpression(array $m)
	{
		$expr = $m[0];
		if ($this->isConstantExpression($expr))
		{
			$result = $this->evaluate($expr);
			if ($this->canBeSerialized($result))
			{
				$foldedExpr = XPath::export($result);
				if (strlen($foldedExpr) < strlen($expr))
				{
					$expr = $foldedExpr;
				}
			}
		}

		return $expr;
	}
protected function foldConstantXPathExpression(array $m)
	{
		$expr = $m[0];
		if ($this->isConstantExpression($expr))
		{
			$result = $this->evaluate($expr);
			if ($this->canBeSerialized($result))
			{
				$foldedExpr = XPath::export($result);
				if (strlen($foldedExpr) < strlen($expr))
				{
					$expr = $foldedExpr;
				}
			}
		}

		return $expr;
	}
protected function foldConstantXPathExpression ( array $ m ) { $ expr = $ m [ 0 ] ; if ( $ this -> isConstantExpression ( $ expr ) ) { $ result = $ this -> evaluate ( $ expr ) ; if ( $ this -> canBeSerialized ( $ result ) ) { $ foldedExpr = XPath :: export ( $ result ) ; if ( strlen ( $ foldedExpr ) < strlen ( $ expr ) ) { $ expr = $ foldedExpr ; } } } return $ expr ; }
Evaluate and replace a constant XPath expression

@param  array  $m
@return string
Evaluate and replace a constant XPath expression