Set namespaces of attributes correctly

Also added tests for them.

I'm not sure what happens to prefixed elements, but that's all the info I could find in the parser output format for now.
Is this true in browsers too? Maybe it is true in HTML mode but not XHTML mode?