public function addNameTest() { if ($this->element == '*') { // We weren't doing a test anyway return; } $this->addCondition(sprintf('name() = %s', XPathExpr::xpathLiteral($this->element))); $this->element = '*'; }