private function initialXpathQuery($xpath, $node, $query)
{
// This works around a bug in which the document element
// does not correctly search with the $baseQuery.
if ($node->isSameNode($this->dom->documentElement)) {
$query = substr($query, 1);
}
return $xpath->query($query, $node);
}