set attribute with provided NS, fixes #1