Sets an element's attribute (using DOM level 2) with the
specified value and namespace prefix AND registers the ID value with
the specified element. This is for resolving same-document
ID references.
Parameters:
-
elem - the element to set the attribute on
-
name - the name of the attribute
-
value - the attribute value. If null, no attribute is set.