throw new ExpressionErrorException('Pseudo-elements are not supported.'
);
} $selectors[$index] =
$this->
selectorToXPath($selector,
$prefix);
} return implode(' | ',
$selectors);
} public function selectorToXPath(SelectorNode
$selector, string
$prefix = 'descendant-or-self::'
): string
{ return ($prefix ?: ''
).
$this->
nodeToXPath($selector);
} /**
* @return $this
*/
public function registerExtension(Extension\ExtensionInterface
$extension):
static { $this->extensions
[$extension->
getName()] =
$extension;
$this->nodeTranslators =
array_merge($this->nodeTranslators,
$extension->
getNodeTranslators());
$this->combinationTranslators =
array_merge($this->combinationTranslators,
$extension->
getCombinationTranslators());