1--TEST-- 2Import of lone attribute 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\XMLDocument::createEmpty(); 9$root = $dom->appendChild($dom->createElement('root')); 10 11$root->setAttributeNS("urn:a", "a:foo", "bar"); 12$attr = $root->getAttributeNodeNS("urn:a", "foo"); 13 14$importer = Dom\XMLDocument::createEmpty(); 15$attr = $importer->importNode($attr, true); 16echo $importer->saveXml($attr), "\n"; 17 18unset($dom); 19unset($root); 20 21var_dump($attr->prefix, $attr->namespaceURI); 22 23?> 24--EXPECT-- 25a:foo="bar" 26string(1) "a" 27string(5) "urn:a" 28