<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Element.prefix = xml10ncname</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 ("http://www.w3.org/XML/1998/namespace", "xml:lang");
} catch (e) { }
if (!el) {
try {
el = document.createAttributeNS ("http://www.w3.org/XML/1998/namespace", "lang");
el.prefix = "xml";
} catch (e) { }
}
var ok = (el && el.prefix == "xml" &&
el.namespaceURI == "http://www.w3.org/XML/1998/namespace");
if (ok) {
try {
el.prefix = "newPrefix";
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>