--TEST--
Bug #81468 (Inconsistent default namespace inheritance)
--EXTENSIONS--
dom
--FILE--
appendChild($dom->createElementNS('some:namespace', 'foo'))
->appendChild($dom->createElement('bar'));
echo ($xml = $dom->saveXml()), "\n";
$xpath = new Dom\XPath($dom);
$xpath->registerNamespace('n', 'some:namespace');
echo "/n:foo/bar -> ", count($xpath->query('/n:foo/bar')), "\n";
echo "/n:foo/n:bar -> ", count($xpath->query('/n:foo/n:bar')), "\n";
//
$dom = Dom\XMLDocument::createFromString($xml);
echo ($xml = $dom->saveXml()), "\n";
$xpath = new Dom\XPath($dom);
$xpath->registerNamespace('n', 'some:namespace');
echo "/n:foo/bar -> ", count($xpath->query('/n:foo/bar')), "\n";
echo "/n:foo/n:bar -> ", count($xpath->query('/n:foo/n:bar')), "\n";
?>
--EXPECT--
/n:foo/bar -> 1
/n:foo/n:bar -> 0
/n:foo/bar -> 1
/n:foo/n:bar -> 0