1--TEST--
2Dom\HTMLDocument serialization of an attribute in a namespace
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createEmpty();
9$root = $dom->appendChild($dom->createElement("root"));
10$root->setAttributeNodeNS($dom->createAttributeNS("http://php.net", "x:foo"));
11$root->setAttributeNodeNS($dom->createAttributeNS("http://www.w3.org/XML/1998/namespace", "y:id"));
12$root->setAttributeNodeNS($dom->createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns"));
13$root->setAttributeNodeNS($dom->createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:f"));
14$root->setAttributeNodeNS($dom->createAttributeNS("http://www.w3.org/1999/xlink", "z:f"));
15
16// Note: XML declarations are not emitted in HTML5
17echo $dom->saveHtml();
18
19?>
20--EXPECT--
21<root x:foo="" xml:id="" xmlns="" xmlns:f="" xlink:f=""></root>
22