1--TEST-- 2Element renaming interaction with the HTML namespace 01 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = DOM\XMLDocument::createEmpty(); 9$el = $dom->createElementNS("http://www.w3.org/1999/xhtml", "foo:bar"); 10$el->rename("http://www.w3.org/1999/xhtml", "foo:baz"); 11var_dump($el->nodeName, $el->namespaceURI, $el->prefix); 12 13// Very subtly *not* the HTML namespace! 14$el = $dom->createElementNS("http://www.w3.org/1999/xhtml/", "foo:bar"); 15$el->rename("urn:x", "foo:baz"); 16var_dump($el->nodeName, $el->namespaceURI, $el->prefix); 17 18?> 19--EXPECT-- 20string(7) "foo:baz" 21string(28) "http://www.w3.org/1999/xhtml" 22string(3) "foo" 23string(7) "foo:baz" 24string(5) "urn:x" 25string(3) "foo" 26