<html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Attr.prefix = empty</title> </head><body> <p id="result" class="FAIL">FAIL (not executed)</p> <script type="text/javascript">// <![CDATA[ var result = document.getElementById ('result'); result.firstChild.data = 'FAIL (script error)'; var el; try { el = document.createAttributeNS (null, "xml:lang"); } catch (e) { } if (!el) { try { el = document.createAttributeNS (null, "lang"); el.prefix = "xml"; } catch (e) { } } var ok = (el && el.prefix == "xml" && el.namespaceURI == null); if (ok) { try { el.prefix = ""; result.className = ''; result.firstChild.data = el.prefix + ', type ' + typeof (el.prefix); } catch (e) { result.className = ''; result.firstChild.data = e.toString (); } } else { result.className = 'NA'; result.firstChild.data = 'N/A'; } // ]]></script> </body></html>