--TEST-- Document::createElementNS() --EXTENSIONS-- dom --FILE-- createElementNS($namespaceURI, $qualifiedName); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } } testError($dom, NULL, "prefix:name"); testError($dom, "", "prefix:name"); testError($dom, "urn:foo", "@"); testError($dom, "http://www.w3.org/2000/xmlns/", "svg"); testError($dom, "urn:foo", "xml:xml"); ?> --EXPECT-- --- Normal cases --- tagName: string(5) "qname" nodeName: string(5) "qname" textContent: string(6) "&hello" prefix: NULL namespaceURI: NULL &hello tagName: string(7) "foo:bar" nodeName: string(7) "foo:bar" textContent: string(6) "&hello" prefix: string(3) "foo" namespaceURI: string(7) "urn:foo" &hello tagName: string(7) "bar:BAR" nodeName: string(7) "bar:BAR" textContent: string(6) "&hello" prefix: string(3) "bar" namespaceURI: string(7) "urn:foo" &hello tagName: string(7) "bar:BAR" nodeName: string(7) "bar:BAR" textContent: string(6) "&hello" prefix: string(3) "bar" namespaceURI: string(7) "urn:foo" &hello tagName: string(5) "xmlns" nodeName: string(5) "xmlns" textContent: string(6) "&hello" prefix: NULL namespaceURI: string(29) "http://www.w3.org/2000/xmlns/" &hello tagName: string(3) "xml" nodeName: string(3) "xml" textContent: string(6) "&hello" prefix: NULL namespaceURI: string(36) "http://www.w3.org/XML/1998/namespace" &hello --- Error cases --- (NULL, "prefix:name"): Namespace Error ("", "prefix:name"): Namespace Error ("urn:foo", "@"): Invalid Character Error ("http://www.w3.org/2000/xmlns/", "svg"): Namespace Error ("urn:foo", "xml:xml"): Namespace Error