[CssSelector] removed the use of lower-case() in XPath as it is not supported by PHP

This commit is contained in:
Fabien Potencier 2010-04-06 18:11:22 +02:00
parent 233a25595f
commit 1b9fee18d4

View File

@ -170,7 +170,11 @@ class FunctionNode implements NodeInterface
{
$expr = $expr->formatElement();
}
$xpath->addCondition(sprintf('contains(css:lower-case(string(.)), %s)', XPathExpr::xpathLiteral(strtolower($expr))));
// FIXME: lower-case is only available with XPath 2
//$xpath->addCondition(sprintf('contains(lower-case(string(.)), %s)', XPathExpr::xpathLiteral(strtolower($expr))));
$xpath->addCondition(sprintf('contains(string(.), %s)', XPathExpr::xpathLiteral($expr)));
// FIXME: Currently case insensitive matching doesn't seem to be happening
return $xpath;