revision:
setAttributeNS() methof adds a new attribute or changes the value of an attribute with the given namespace and name.
setAttributeNS(namespace, name, value)
Parameters:
namespace : a string specifying the namespace of the attribute.
name : a string identifying the attribute by its qualified name; that is, a namespace prefix followed by a colon followed by a local name.
value : the desired string value of the new attribute.
let d = document.getElementById("d1"); d.setAttributeNS( "http://www.mozilla.org/ns/specialspace", "spec:align", "center" );