1--TEST-- 2Default namespace move 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = Dom\XMLDocument::createEmpty(); 9$root = $dom->appendChild($dom->createElementNS('urn:a', 'foo:bar')); 10$child = $root->appendChild($dom->createElementNS('urn:a', 'foo:baz')); 11$child->setAttributeNS("urn:b", "foo:attr", "value"); 12$root->remove(); 13$dom->appendChild($child); 14echo $dom->saveXml(), "\n"; 15 16$dom2 = Dom\XMLDocument::createEmpty(); 17$child = $dom2->importNode($child, true); 18$dom2->appendChild($child); 19echo $dom2->saveXml(), "\n"; 20 21?> 22--EXPECT-- 23<?xml version="1.0" encoding="UTF-8"?> 24<foo:baz xmlns:foo="urn:a" xmlns:ns1="urn:b" ns1:attr="value"/> 25<?xml version="1.0" encoding="UTF-8"?> 26<foo:baz xmlns:foo="urn:a" xmlns:ns1="urn:b" ns1:attr="value"/> 27