<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Attr.prefix = nonxmlname</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, "originalPrefix:localName");
} catch (e) { }
if (!el) {
try {
el = document.createAttributeNS (null, "localName");
el.prefix = "originalPrefix";
} catch (e) { }
}
var ok = (el && el.prefix == "originalPrefix" &&
el.namespaceURI == null);
if (ok) {
try {
el.prefix = "12345";
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>