--TEST--
Bug #45553 (Using XPath to return values for attributes with a namespace does not work)
--SKIPIF--
--FILE--
test1
test2
XML;
$x = simplexml_load_string($xml);
$x->registerXPathNamespace("a", "http://a");
$atts = $x->xpath("/xml/data/@a:label");
echo $atts[0] . "\n";
$atts = $x->xpath("/xml/a:data");
echo $atts[0]->attributes() . "\n";
$atts = $x->xpath("/xml/a:data/@a:label");
echo $atts[0] . "\n";
$atts = $x->xpath("/xml/a:data/@label");
echo $atts[0] . "\n";
$atts = $x->xpath("/xml/data/@label");
echo $atts[0] . "\n";
?>
--EXPECT--
I am A
I am a:Nothing
I am a:A
I am a:Nothing
I am Nothing